Skip to content

Tag Archives: base-conversion

This program checks whether a number n can be expressed as power of k and if yes, then to what power should k be raised… Read More
The problem is to check whether the decimal representation of the given binary number is divisible by 10 or not. Take care, the number could… Read More
Find the binary equivalent of the given non-negative number n without using arithmetic operators. Examples:  Input : n = 10Output : 1010 Input : n… Read More
Write Python code for converting a decimal number to it’s binary equivalent and vice-versa. Example:  From decimal to binary Input : 8 Output : 1… Read More
A string defining a valid number is given. Output all the base conversions of substrings of length ‘k’ from base ‘b’ to base 10. Examples: … Read More
Given a hexadecimal number as input, we need to write a program to convert the given hexadecimal number into an equivalent decimal number. Examples:   Input… Read More
Given an octal number as input, we need to write a program to convert the given octal number into equivalent decimal number. Examples: Input :… Read More
Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent octal number. i.e convert… Read More
Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent binary number. Examples:  Input… Read More
Given a binary number as input, we need to write a program to convert the given binary number into an equivalent decimal number. Examples : … Read More
The problem is to convert the given binary number (represented as string) to its equivalent octal number. The input could be very large and may… Read More
Given a number in decimal number convert it into binary, octal and hexadecimal number. Here is function to convert decimal to binary, decimal to octal… Read More
Given a Binary Number, the task is to convert the given binary number to its equivalent hexadecimal number. The input could be very large and… Read More
Electronic and Digital systems may use a variety of different number systems, (e.g. Decimal, Hexadecimal, Octal, Binary), or even Duodecimal or less well known but… Read More
Python defines type conversion functions to directly convert one data type to another which is useful in day-to-day and competitive programming. This article is aimed… Read More

Start Your Coding Journey Now!