Number System Base
Note:
We do not need to memorize each binary digit for its equivalent decimal conversion as there is a clear pattern of repetition as shown above.
We do not need to memorize each binary digit for its equivalent decimal conversion as there is a clear pattern of repetition as shown above.
Decimal number
- Base of 10
- Composed of 10 digits (0 to 9)
Binary number
- Base of 2
- Consist of only digits 0 and 1
Hexadecimal number
- Base of 16
- Composed of alphanumeric values 0 to F
- Suitable to represent binary numbers with a multiple of 4 bits
Number System Conversion
Decimal to binary
The conversion of decimal
(base 10) to binary (base 2) is a simple division of the decimal number by two.
The remainder from the division by 2 makes up a bit of the binary number.
Here are some examples (using the most common method) :
Here are some examples (using the most common method) :
For the decimal part .3125, we take the decimal and multiply by 2:
0.3125 x 2 = 0.625
Next we take .625 and do the same multiplication
step:
0.625 x 2 = 1.25
The multiplication step is repeated by taking
.025:
*Note: we only take the decimal part.
0.25 x 2 = 0.50
The step is again repeated until we obtain the
value 1.00. We stop here because we have zero
as the decimal part value.
Hence, 0.50 x 2 = 1.00
The whole number part of the result is the
binary digit.
Therefore, the binary value for 57.3125 is
110011.01012
Binary to decimal and hexadecimal to decimal
To convert binary number to decimal number, we
add the product of the values and the digits of each bit. The values of each bit
are 2 to the power of that bit.
Example:
Likewise for hexadecimal to decimal.
Example:
Binary to hexadecimal
To convert a binary number to hexadecimal, we
divide it into groups of four bits starting from the right. If the number bits
is not a multiple of four we add extra 0 bits to the left. This action is
called padding.
Examples:

The number of bits above is not a multiple of 4, therefore we add two extra 0 bit to the left and then divide it to groups of 4 bits.
Hexadecimal to binary
This conversion is probably the easiest of
all. We just take the hexadecimal value and substitute it with its
corresponding binary digits.
For example:
4A16 = 010010102
D6416 = 1101011001002
These topics may not be the heart of Computer Organization & Architecture but without this knowledge, understanding upcoming topics will be difficult. These are the basics in Computer Organization & Architecture.
Thank You.
A really brief and good post. Easy to understand and lovely blogspot. Keep up the good work.
ReplyDeleteSimple and useful piece of information. Keep it up! :D
ReplyDelete