Number System - Decimal, Binary and Hexadecimals Numbers
What is Number System?
Decimal Numbers
Example,
2024 = 2 * 1000 + 0 * 100 + 2 * 10 + 4 * 1
2 | 0 | 2 | 4 |
---|---|---|---|
d3 | d2 | d1 | d0 |
Binary Numbers
0
and 1
are the representation of the lower and higher voltages at the hardware level, mainly with CPUExample, Take number 1101
We can write it as (1101)base 2 - the subscript is used to determine which base the number belongs to, in this case base 2
is written, that means 0
and 1
are the only digits being used to write these number.
1 | 1 | 0 | 1 |
---|---|---|---|
d3 | d2 | d1 | d0 |
d0
is the least significant digit, any digit at position zero is least significant digit.Hexadecimal Numbers
0 to 9
and A to F
A base 16 = 10 base 10
B base 16 = 11 base 10
C base 16 = 12 base 10
D base 16 = 13 base 10
E base 16 = 14 base 10
F base 16 = 15 base 10
Example, 6D1A
6 | D | 1 | A |
---|---|---|---|
d3 | d2 | d1 | d0 |
We can make any base number, there is Octal number also, it has 8 digits. There can be as many as you wish to make, we can make 19 digits, 25 digits
These 4 - Decimal, Binary, Hexadecimal and Octal are standard.
© progshala.in