Professional Documents
Culture Documents
CSC 101 2019 2020 Module 2
CSC 101 2019 2020 Module 2
The “a” in the above equation are called digits and may have one of “b” possible values.
Positional notation employs the radix point to separate the integer and fractional parts of
the number. Decimal arithmetic uses the decimal point while binary arithmetic uses
binary point.
We shall be considering four bases – decimal, binary, octal, and hexadecimal
Subscript is used to indicate the base of a number when necessary, for example, 123 10,
4568, 10112.
People normally work in decimal and computers in binary. The purpose of the octal and
hexadecimal systems is as an aid to human memory since they are shorter than binary
digits. Moreover, octal and hexadecimal numbers are more compact than binary numbers
(one octal digit equals three binary digits and one hexadecimal digit equals four binary
digits), they are used in computer texts and core-dumps (printout of part of the
computer’s memory). The advantage of binary number is in decoding electrical signals
that switch on (logical one), or switch off (logical zero) a device.
a. CONVERSION OF INTEGERS FROM DECIMAL TO BINARY
To convert a decimal integer to binary, divide the number successively by 2, and after
each division record the remainder which is either 1 or 0. The process is terminated only
when the result of the division is 0 remainder 1. The result is read from the most
significant bit (the last remainder) upwards.
0.6875 × 2 = 1.3750
0.3750 × 2 = 0.7500
0.7500 × 2 = 1.5000
0.5000 × 2 = 1.0000
∴ 0.687510 = 0.10112
We can convert from decimal fractions to octal or hexadecimal fractions by using the
same algorithms used for binary conversions. We only need to change the base (that is:
2, 8, 16).