Thursday, October 20, 2016

Converting Common Numeral Systems to BASE 10


A numeral system in a way to represent or express numbers using digits or other symbols in a consistent manner.

The most widely used numeral system by people is decimal, or BASE 10.

Definitions


10^4

In the example above, the number 10 is called the BASE (or radix / root), and the number 4 is called the exponent. The exponent corresponds to the number of times the base is used as a factor (4 x 4 x 4 x 4).

Binary (0, 1) - used by logic gates in most digital circuits

To convert the binary number 1011 to decimal,

 1         0         1         1             # Your binary number
(1x2^3) + (0x2^2) + (1x2^1) + (1x2^0) # Multiply your number by the power of the base that the digit represents
   8    +    0    +    2    +    1    = 11   # Add the numbers together to get the result in BASE 10


Octal (0..7) - used often in computing

To convert the octal number 350 into decimal,

 3         5         0 # Your octal number
(3x8^2) + (5x8^1) + (0x8^0) # Multiply your number by the power of the base that the digit represents
  192   +   40    +    0    = 232 # Add the numbers together to get the result in BASE 10


Hexadecimal, hex (0..9, a..f) - used often in computing

To convert the hex number 1F20 into decimal,

 1   F      2     0 # Your hex number
(1x16^3) + (Fx16^2)  + (2x16^1) + (0x16^0) # Multiply your number by the power of the base that the digit represents
(1x16^3) + (15x16^2) + (2x16^1) + (0x16^0) # Convert the hex numbers into the decimal equivilent
4096     +  3840     +  32      +  0       = 7968 # Add the numbers together to get the result in BASE 10


Further Reading:

http://whatis.techtarget.com/definition/logic-gate-AND-OR-XOR-NOT-NAND-NOR-and-XNOR

No comments:

Post a Comment