Chapter_two (2)
Chapter_two (2)
Chapter Two
Number systems, operations
and codes
School of Electrical and Computer Engineering
▪ Binary number system has a radix of two and uses the digits 0
and 1 to represent quantities.
…25 24 23 22 21 20.
26 25 24 23 22 21 20.
64 32 16 8 4 2 1.
0 1 1 0 0 0 1.
▪ The quotient produces the binary number with the first quotient is
the MSB.
Convert the decimal fraction 0.188 to binary by repeatedly
multiplying the fractional results by 2 until 5 significant
figures.
Answer: 1 1 0 0 0 1 remainder
0 1 3 6 12 24 49 2
Continue until the Decimal
Quotient base
last quotient is 0 number
▪ Adding the column values of all of the bits that are 1 and discarding all
of the bits that are 0.
➢ Binary Addition
1 + 0 + 0 = 01 Sum = 1, carry = 0
1 + 0 + 1 = 10 Sum = 0, carry = 1
1 + 1 + 0 = 10 Sum = 0, carry = 1
1 + 1 + 1 = 11 Sum = 1, carry = 1
Add the binary numbers 00111 and 10101 and show the
equivalent decimal addition.
0111
00111 7
10101 21
11100 = 28
0−0=0
1−1=0
1−0=1
10 − 1 = 1 with a borrow of 1
Subtract the binary number 00111 from 10101 and show
the equivalent decimal subtraction.
111
1/ 0/ 1/ 01
21
00111 7
01110 = 14
0 0 1 1 0 1 0 1
0 0 1 1 0 1 0 1
Input bits
Adder Carry
in (add 1)
Output bits (sum)
0 0 1 1 0 1 1 0
✓ Positive numbers are stored in true form (with a 0 for the sign bit)
and negative numbers are stored in complement form (with a 1 for
the sign bit).
Express 10010110000011102 in
octal:
Group the binary number by 3-bits
starting from the right. Thus, 1130168