Chapter 2
Chapter 2
Chapter 2
Institute of Technology
Department of Electrical and Computer Engineering
By: Endalkachew D.
Chapter two
Numbering System and Data Representation
Outlines
❖Binary Systems
❖Data Representation
Binary Systems
Digital systems have such a prominent role in everyday life that we refer to the
present technological period as the digital age.
Digital systems are used in
✓Communication,
✓Business transactions,
✓Traffic control,
✓Space guidance,
✓Medical treatment,
✓Weather monitoring,
✓Internet, and
✓Many other commercials, industrial, and scientific enterprises.
Cont.…
✓Digital systems manipulate discrete quantities of information that are represented
in binary form.
✓Operands used for calculations may be expressed in the binary number system.
✓A decimal number such as 7,392 represents a quantity equal to 7 thousand plus 3
hundred, plus 9 tens, plus 2 units
7392 = 7x10^3 + 3x10^2 + 9x10^1 + 2x10^0
A number with a decimal point is represented by a series of coefficients as follows:
D^5 d^4 d^3 d^2 d^1 d^0.d^-1 d^-2 d^-3
For example, the decimal number 26.75 can be represented
26.75 = 2x10^1 + 6x10^0 + 7x10^-1 + 5x10^-2
Cont.…
✓The decimal number system is said to be off base or radix, 10 because it uses 10
digits and the coefficients are multiplied by powers of 10.
✓The binary system is a different number system.
✓The coefficients of the binary numbers system have only two possible values: 0
or1.
✓Each coefficient d is multiplied by 2^n
For example, the decimal equivalent of the binary number 11010.11 is 26.75, as
shown from the multiplication of the coefficients by powers of 2:
1x2^4 + 1x2^3 + 0x2^2 + 1x2^1 + 0x2^0 + 1x2^-1 + 1x2^-2 = 26.75
Cont.…
Let us consider a base 5 number and its conversion to a decimal number
(𝟒𝟎𝟐𝟏.𝟐)𝟓 = 4x5^3 + 0x5^2 + 2x5^l + lx5^0 + 2x5^-l =(𝟓𝟏𝟏.𝟒)𝟏𝟎
The coefficient values for base 5 can be only 0, 1, 2, 3, and 4.
The octal number system is a base- 8 system that has eight digits: 0, 1, 2, 3, 4, 5, 6,
7.
An example of an octal number is 127.4
(𝟏𝟐𝟕.𝟒)𝟖 = 1x8^2 + 2x8^1 + 7x8^0 + 4x8^-1 = (𝟖𝟕.𝟓)𝟏𝟎
Number Base Conversions
The conversion of a number in base `r` to decimal is done by expanding the number
in a power series and adding all the terms
Example1
Convert decimal 41 to binary.
First, 41 is divided by 2 to give an integer quotient of 20 and a remainder of ½.
The quotient is again divided by 2 to give a new quotient and remainder.
This process is continued until the integer quotient becomes 0.
Cont.…
Quotient remainder Coefficient
41/2 20 1 a0=1
20/2 10 0 a1=0
10/2 5 0 a2=0
5/2 2 1 a3=1
2/2 1 0 a4=0
1/2 0 1 a5=1
The answer is (41)10 = (101001)2
The conversion from decimal integers to any base `r` system is similar to the
example, except that division is done by r instead of 2.
Cont.…
Example 2
Convert decimal 153 to octal.
The required base `r` is 8. First, 153 is divided by 8 to give an integer quotient of 19
and a remainder of 1. Then 19 is divided by 8 to give an integer quotient of 2 and a
remainder of 3. Finally, 2 is divided by 8 to give a quotient of 0 and a remainder of
2.
This process can be conveniently manipulated as follows:
Quotient remainder Coefficient
153/8 19 1 a0=1
19/8 2 3 a1=3
2/8 0 2 a2=2
The answer is (153)10 = (231)8
Cont.…
The conversion of a decimal fraction to binary is accomplished by a method similar
to that used for integers. However, multiplication is used instead of division, and
integers are accumulated instead of remainders.
Example
Convert (𝟎. 𝟔𝟖𝟕𝟓)𝟏𝟎 to binary.
First, 0.6875 is multiplied by 2 to give an integer and a fraction. The new fraction is
multiplied by 2 to give a new integer and a new fraction. This process is continued
until the fraction becomes 0 or until the number of digits has sufficient accuracy.
The coefficients of the binary number are obtained from the integers as follows:
Cont.…