Inbound 3076236495533383827
Inbound 3076236495533383827
Inbound 3076236495533383827
10
Example:
2910 = 111012
Example 2:
Examples: Decimal to Binary
1001
-111
-------------
0010
Example:
3.) 1 1 0 1 4.) 1 1 1 0
x 100 x110
Octal system used to be widespread back
when many computers used 6-bit bytes, as
a 6-bit byte can be conveniently written as
a two-digit octal number. Since nowadays a
byte is almost always 8-bits long the octal
system lost most of its appeal to the
hexadecimal system.
Octal to Decimal
Example 1:
Example 2:
Binary to Octal
To convert a binary integer to octal, each three-bit
cluster corresponds to a single octal digit. If the
number of bits in the binary integer is not a multiple
of three, add zeros to the left, e.g., 11011 = 011011.
There are spaces between to separate the three-bit
clusters in the numbers below so you can see the
correspondence with the octal-digits.
Steps:
Step 1 − Divide the binary digits
into groups of three starting from
the right.
Step 2 − Convert each group of
three binary digits to one octal
digit.
Table: Binary to Octal
Binary
Octal
Example:
Binary Number − 101012
Calculating Octal Equivalent
1) A216 = 2x160 = 2
10x161 = 160
16210
2.) 13BC16 = 12x160 = 12
11x161 = 76
3x162 = 768
1x163 = 4096
505210
Hexadecimal numbers (base 16) can be
added using the same method. The
difference is that there are more digits in
hexadecimal than there are in decimal. For
example, in decimal, adding 5 and 7 results
in 2 with a carry to the next highest
position. In hexadecimal, however, 5 added
to 7 does not go beyond the range of a
single digit. In this case, 5 + 7 = C16 with no
carry. It isn't until a result greater than F16 is
reached (a decimal 1510) that a carry is
necessary.
In decimal, if the result of an addition
is greater than 9, subtract 1010 to get
the result for the current column and
add a carry to the next column. In
hexadecimal addition, if the result is
greater than F16 (1510) subtract 1016
(1610) to get the result for the current
column and add a carry to the next
column.
D16 + 516 = 1310 + 510 = 1810
Solution:
Just like in binary and decimal, place one of the
numbers to be added on top of the other so that
the columns line up.
For the next column, the 161 position, we have
1 + 3 + 2 which equals 6. This result is less
than 1610, so there is no carry to the next
column.
The 162 position has A16 + 916 which in
decimal is equivalent to 1010 + 910 = 1910.
Since this is greater than 1610, we must
subtract 1610 to get the result for the 162
column and add a carry in the 163
column.
For the 163 column, we have 116 + D16 +
216 which is equivalent to 110 + 1310 + 210 =
1610. This gives us a zero for the result in
the 163 column with a carry.
Last of all, 1 + 3 + 4 = 8 which is the same
in both decimal and hexadecimal, so the
result is 3DA3216 + 4292F16 = 8036116:
Hexadecimal Subtraction
The subtraction of hexadecimal numbers
follow the same rules as the subtraction of
numbers in any other number system. The
only variation is in borrowed number. In the
decimal system, you borrow a group of 1010.
In the binary system, you borrow a group of
210. In the hexadecimal system you borrow a
group of 1610.
Example: