Tag Archives: base-conversion

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 interger N and base B, the task is to find the largest N-digit numbers of Base B in decimal form.Examples:   Input: N… 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
Given two integers N and B, the task is to check N is a Digitally balanced number in base B. Digitally balanced numbers in the… Read More
Given a binary valued undirected graph with V vertices and E edges, the task is to find the hexadecimal equivalents of all the connected components… Read More
Given a number N, the task is to write C program to count the number of 0s and 1s in the binary representation of N.… Read More
Given two integers X, Y in base B1 and B2 respectively, the task is to find the sum of integers X and Y and represent… Read More
Given a binary-valued Undirected Graph with V vertices and E edges, the task is to find the maximum decimal equivalent among all the connected components… Read More
Given two numbers A and B, the task is to perform BCD Addition of the given numbers. Examples:  Input: A = 12, B = 20 Output:… Read More
Given a binary valued undirected graph with V vertices and E edges, the task is to find the octal equivalents of all the connected components… Read More
Given a HexaDecimal Number N, the task is to convert the number to its equivalent Binary Coded Decimal.Examples:   Input: 11F Output: 0001 0001 1111 Explanation: Binary of 1… Read More
Given a BCD (Binary Coded Decimal) Number, the task is to convert this Binary Coded Decimal number to its equivalent Hexa-Decimal Number.Examples:  Input: 100000101111 Output: 82F Explanation: Dividing… Read More