Skip to content

# Tag Archives: base-conversion

Given a positive integer N, the task is to count the number of different bases in which, when N is represented, the most significant bit… Read More
Given two positive integers A and B and a string S of size N,  denoting a number in base A, the task is to convert… Read More
Given an array arr[] consisting of N floating-point numbers, the task is to print the decimal representation of the binary array constructed from the absolute… Read More
Given a binary string S, the task is to print all distinct decimal numbers that can be obtained by generating all permutations of the binary… Read More
Given an array arr[] consisting of N integers, the task is to modify the array by replacing each array element with the number obtained by… Read More
Given a base 4 number N, the task is to write a python program to print its binary equivalent. Conversion Table: Examples: Input : N=11002233… Read More
Given an array arr[] of size N and a string S, the task is to modify given array by removing all characters from their hexadecimal… Read More
Given an integer K and an array Q[][] consisting of N queries of type {L, R}, the task for each query is to print the… Read More
Given a positive integer N, the task is to find the Nth natural number after removing all the natural numbers containing digit 9. Examples: Input:… Read More
Given an integer N representing the base of a number, the task is to find the largest left-truncatable prime in the given base N. Examples:… Read More
Given a number N and any base B. The task is to check if N can be expressed in the form a1*b0 + a2*b1 +… Read More
Given two numeric Hexadecimal numbers str1 and str2, the task is to add the two hexadecimal numbers.  Hexadecimal Number system, often shortened to “hex”, is… Read More
Given three numbers N, K, and B, the task is to check if N contains only K as digits in Base B. Examples:  Input: N… Read More
Given a positive integer N and base B, the task is to find the largest N-digit numbers of Base B in decimal form. Examples:  Input:… Read More
Binary Coded Decimal, or BCD, is another process for converting decimal numbers into their binary equivalents. It is a form of binary encoding where each… Read More