Professional Documents
Culture Documents
Cha 2.1 PDF
Cha 2.1 PDF
Cha 2.1 PDF
UNIVERSITY OF GONDAR
INSTITUTE OF TECHNOLOGY
Department of Electrical and Computer Engineering
Course name: Digital Logic Design
Course code: ECEg3141
Course instructor: Amare Worku
Contact information:
Email: amareworku2154@gmail.com
Department of Electrical and Computer Engineering
Consultation hours: friday: from 8:00-11:00
CHAPTER TWO 2
Number system operation and code
Number system is nothing more than a code that uses symbol to refer a quantity of item.
Binary number system and digital code are fundamental to computer and digital electronics.
Decimal number system (0 1 2 3 4 5 6 7 8 9)
Any number is simply the sum of the product of each digit value and its positional weight.
Decimal (base 10):
An - 1An - 2 … A1A0 . A- 1 A- 2 … A- m
Integer Part Fraction Part
Example 1.
The following are some of the technical terms used in binary system:
Bit: It is the smallest unit of information used in a computer system. It can either have the value 0 or 1. Derived from the
words Binary ditIT.
Nibble: It is a combination of 4 bits.
Byte: It is a combination of 8 bits.
Word: It is a combination of 16 bits.
Double word: It is a combination of 32 bits.
Kilobyte (KB): It is used to represent the 1024 bytes of information.
Megabyte (MB): It is used to represent the 1024 KBs of information.
Gigabyte (GB): It is used to represent the 1024 MBs of information.
Continue until
you get a 0
quotient
DLD chapter two 10/16/2017
12
Converting fraction from decimal to base b:
Repeatedly multiply the integer by the new base b and save the integer part of the result (will never exceed b)
until 0 fraction or enough digits .
The digits for the new base are those integers with the MS digit being that computed first
Continue until
you get either:
Zero fraction, or
Enough # of
DLD chapter two 10/16/2017
Significant fraction digits
13
Cont.…
Example3.
A.(153.513)10 = (?)2
B. (210.625)10= (?)2
C. (127.50)10 = (?)2
A.11+11
B.100+10
C.111+11
D.110+100
E.100001110 +111100010
F.1010101011+000011101
Binary number multiplication is performed in the same manner as decimal number multiplication.
It involves forming partial product, shifting successive partial product left on place and then adding all the partial
product.
Example 4.
Perform the following unsigned binary multiplication.
a,11*11
b.101*111
c.1101*1010
1’s and 2’s complement binary number system are very important to represent negative
number.
For ‘n’ binary number First find , (rn – 1) in binary number form then subtract the
the complemented number from (rn – 1) .
Example.6
For r = 2, N = 011100112, n = 8 (8 digits):
(rn – 1) = 256 -1 = 25510 or 111111112
The 1's complement of 011100112 is then:
11111111 (8 1’s)
– 01110011
10001100
DLD chapter two 10/16/2017
24
Finding the 2’s complement
The 2’s complement of the binary number is obtained by adding 1 to LSB of1’s complement of the
number.
2’s complement = 1’s complement + 1
2’s complement of the negative binary number is realized by using inverter and adder.
Example 10101010
Example.5
perform the 2’s complement of the following binary number
A.00011010 C.1000101
B.11110111 D.111000
Given: an n-bit binary number, beginning at the least significant bit and proceeding
to higher bits:
Starting at the LS bit, Copy all least significant 0’s
Copy also the first 1
Complement all remaining bits thereafter.
2’s Complement Example:
10010100
Copy underlined bits:
To convert from 1’s and 2’s complement back to the true (complemented) binary number form, use the
same procedure.
To go from 1’s complement to true binary revers all the bite.
To go from the 2’s complement back to the true binary form, take the 1’s complement of the 2’s
complement number and add 1 to the LSB