Computer Fundamentals Assignment
Computer Fundamentals Assignment
php
Module 1.2
Octal to Decimal
For example the system radix of octal is 8, since any of the 8 values
from 0 to 7 can be written as a single digit.
Using the values of each column, (which in an octal integer are powers
of 8) the octal value 1268 can also be written as:
As (82 = 64), (81 = 8) and (80 =1), this gives a multiplier value for each column.
Multiply the digit in each column by the column multiplier value for that column to
give:
64 + 16 + 6 = 8610
Binary to Decimal
= (1x23)+(1x22)+(0x21)+(1x20)
= 8 + 4 +0 +1
= 1310
Hexadecimal to Decimal
= (Bx162)+(2x161)+(Dx160)
= (11x162)+(2x161)+(13x160)
= 2816 + 32 +13
= 286110
Decimal to Octal
Continue dividing the answer by 8 and writing down the remainder until
the answer = 0
Now simply write out the remainders, starting from the bottom, to give
1268
Therefore 8610 = 1268
Decimal to Binary
This process also works to convert decimal to binary, but this time the
system radix is 2:
Decimal to Hexadecimal
It also works to convert decimal to hexadecimal, but now the radix is 16:
In electronics this is not normally done, as binary does not work well with
fractions. However as fractions do exist, there has to be a way for binary
to deal with them. The method used is to get rid of the radix (decimal)
point by NORMALISING the decimal fraction using FLOATING
POINT arithmetic. As long as the binary system keeps track of the
number of places the radix point was moved during the normalisation
process, it can be restored to its correct position when the result of the
binary calculation is converted back to decimal for display to the user.
The radix point splits the number into two parts; the part to the left of the
radix point is called the INTEGER. The part to the right of the radix point
is the FRACTION. A number such as 34.62510 is therefore split into
3410 (the integer), and .62510(the fraction).
To convert such a fractional decimal number to any other radix, the
method described above is used to covert the integer.
So 3410 = 1000102
To convert the fraction, this must be MULTIPLIED by the radix (in this
case 2 to convert to binary). Notice that with each multiplication a
CARRY is generated from the third column. The Carry will be either 1 or
0 and these are written down at the left hand side of the result. However
when each result is multiplied the carry is ignored (don’t multiply the
carry). Each result is multiplied in this way until the result (ignoring the
carry) is 000. Conversion is now complete.
For the converted value just read the carry column from top to bottom.
So 0.62510 = .1012
Quick Conversions
To convert from binary to decimal, write down the binary number giving
each bit its correct ‘weighting’ i.e. the value of the columns, starting with
a value of one for the right hand (least significant) bit. Giving each bit
twice the value of the previous bit as you move left.
Example:
Now simply add up the values of each column containing a 1 bit, ignoring
any columns containing 0.
Applying the appropriate weighting to 01000011 gives 64 + 2 + 1 = 67
The hexadecimal digits are entered in the bottom row and then
multiplied by the weighting value for that column.
Adding the values for each column gives the decimal value.
Convert:
110100112 to decimal.
101110112 to decimal.
34F216 to decimal.
FFFF16 to decimal.
Check your answer by converting the decimal back to binary or
hexadecimal.
Don’t use your calculator - you need to learn the method, not just
the answer!
111010012 is split into 2 nibbles 11102 and 10012 then each nibble is
assigned a hexadecimal value between 0 and F.
The bits in the least significant nibble (10012) add up to 8+0+0+1 = 910 =
916