Anything related to number systems, i.e. the way of representing numbers (the abstract mathematical entities) as finite sequences of symbols. Usually this tag is relevant on questions involving conversion from the representation in a number system to another (e.g. from decimal to binary).
Questions tagged [number-systems]
106 questions
1
vote
2 answers
How to switch from hexadecimal to 2^16 system in c++
I have a task like this:
The user enters the numbers N1(str1) and N2(str2) in hexadecimal. The program must convert the numbers from hexadecimal to a system of 2 ^ 16 and count the sum of the numbers N1 and N2 in the 2^16 system, then translate the…

Laura
- 35
- 4
1
vote
1 answer
Converting String to byte array for hex values
I am using a Android Phone to communicate with a BLE device.
The method to send data for the library needs byte[],
sharing one of the static example snippet:
public static final byte dataRequest[] = { 0x23, 0x57, 0x09, 0x03, (byte) 0xD4};
…

KarmaCoding
- 87
- 3
- 16
1
vote
2 answers
Converting a column from decimal to binary string in Spark / Scala
I have a Spark dataframe with decimal column. I want to convert this column to a binary string. Are there any function for this can anybody help?
Thank you!

Beril Boga
- 97
- 2
- 9
1
vote
0 answers
BCD of a decimal to Hexadecimal
I have this problem:
convert: 17535455(base 10) to BCD to hexadecimal
(another way of saying it: convert the BCD of 17535455(base 10) to Hexadecimal)
should I convert the BCD directly to Hexadecimal? If that would be the case then the answer would…
user8476655
1
vote
1 answer
How to convert stack of rows of binary digits into column of values in Python?
Suppose I have
>>> np.array([[0,0],[0,1],[1,0],[1,1]])
array([[0, 0],
[0, 1],
[1, 0],
[1, 1]])
This is a matrix, each of lines of which can be regarded as binary representation of some number, so it is
>>>…

Suzan Cioc
- 29,281
- 63
- 213
- 385
1
vote
1 answer
Converting quaternary to octal. ASM 8086
I have to prepare program for 8086 processor which converts quaternary to octal number.
My idea:
Multiplying every digit by exponents of 4 and add to register. Later check the highest exponent of 8 not higher than sum from first step.
Divide by…

Adam A
- 157
- 1
- 18
1
vote
1 answer
Converting to and from a number system that doesn't have a zero digit
Consider Microsoft Excel's column-numbering system. Columns are "numbered" A, B, C, ... , Y, Z, AA, AB, AC, ... where A is 1.
The column system is similar to the base-10 numbering system that we're familiar with in that when any digit has its…

Taylor Lopez
- 813
- 1
- 8
- 28
1
vote
2 answers
How to Convert very large Decimal number to Factorial number system?
I want to convert decimal number to Factorial number system.
I want to do this for finding nth Lexicographic permutation of array up to 100 elements eg. A[87]={1,2,3..,87}
I am given index 'n' whose lexicographic permutation at that position I…

Akshay Patel
- 85
- 10
1
vote
3 answers
What is the importance of 1's complement and 2's complement in Binary
I'm trying to learn binary number system and almost very new. I just finished some chapter on binary number conversation,addition,subtraction etc with some basic thing's.
But now I see a chapter on 1's complement and 2's complement. I know what is…

Robin
- 446
- 2
- 4
- 24
1
vote
1 answer
How to perform base-5 addition , when negative place values are given?
In a base-5 number system having the digits T,M,0,1,2 and their place values are -2,-1,0,+1,+2 respectively, then:
What is the maximum decimal value that can be formed?
(MT01) + (1TM0) = ??
This question was given in a recruitment test of a VLSI…

srand9
- 337
- 1
- 6
- 20
1
vote
4 answers
how to find total number of numbers whose binary representation is palindrome?
What is the best approach to find the total number of numbers between two given numbers whose binary representation is palindrome?
The problem I am trying to solve is here on spoj
http://www.spoj.com/problems/BINPALI/

Satish Patel
- 1,784
- 1
- 27
- 39
1
vote
1 answer
Understanding subtraction algorithm
From this MIT handout on number system:
Decimal subtraction works very similar to decimal addition, the
numbers are aligned to the same place values and the algorithm
proceeds from right to left. The bottom digit is subtracted from the
top digit,…

Geek
- 26,489
- 43
- 149
- 227
0
votes
4 answers
Number System - Dividing a number by a value which is greater than 0 and less than 1
When I see a m/n equation, I thought it as the value of each part of m if m gets divided n number of times.
For, 10/2, 10 to be divided into 2 parts so each part holds value equal to 5.
10/1 implies 10 to be divided into only 1 part so that single…

wholesome
- 57
- 9
0
votes
1 answer
Print ith bit of the binary number, please find the error as it is printing wrong numbers on some bits
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = 1010110;
System.out.println("the ith bit is " + ithBit(x, n));
}
public static int ithBit(int…

Ashish Kumar
- 11
- 1
0
votes
3 answers
Problem with infinite loop when converting ASCII to Binary (in C)
I'm writing a code to convert a text into ASCII and then to binary. The text->ASCII conversion works fine, but during the ASCII->binary conversion I get an infinite loop when I run the program. Which part of my code is wrong?
P. S. I'm working with…

Nare Avetisyan
- 1
- 1