Chapter 1
Chapter 1
• Course Objectives
– To familiarize the students with basic digital logic design concept used for design of digital
circuits.
• Text Book
– M. M. Mano, "Digital Design," 4th Ed.
• Reference
– M. M. Mano, “Logic and Computer Design Fundamentals” 2nd Ed., Prentice Hall Inc.,
2000.
– Norman Balabanian, Bradley carlson, “Digital Logic Design Principles” John Wiley & Sons
Inc., 2001.
• Grade
– Quizzes: 10%
– Assignment: 10%
– Mid Term: 30%
– Final Exam: 50%
• Course contents
– Chapter 1-6
Chapter 1
Binary Systems
Digital Systems
Binary Numbers
Number Base Conversion
Octal and Hexadecimal Number
Complements
Signed Binary Numbers
Binary Codes
Binary Storage and Registers
Binary Logic
Binary Systems
• Digital age
• Digital computers
– many scientific, industrial and commercial applications
– space program
• Digital systems
– telephone switching exchanges
– digital camera
– electronic calculators, PDA's
– digital TV
• Discrete information-processing systems
• Why binary?
– reliability: a transistor circuit is either on or off (two stable states)
Digital Computer
- stored program
- control unit
- arithmetic computations and logical operations
Digital Systems
Discrete Discrete
Inputs Information
Processing
System Discrete
Outputs
System State
Signals
AND Gate
1
0
0
Powers of Two
Important powers of 2
Hexadecimal
(base16)
r-Decimal Conversion
• In general (Number)r = ( i = n −1
i =0
ai • r +
i
) ( j = −1
a
j =− m j
• r j
)
(Integer Portion) + (Fraction Portion)
Decimal-r Conversion
• If a decimal number has a radix point, it is necessary
to separate the number into an integer part and a
fraction part.
• The conversion of a decimal integer into a number in
base-r is done by dividing the number and all
successive quotients by r and accumulating the
remainders in reverse order of computation.
• For example, to convert decimal 13 to binary:
Integer
Quotient Remainder Coefficient
13/2 = 6 + ½ a0 = 1
6/2 = 3 + 0 a1 = 0
3/2 = 1 + ½ a2 = 1
1/2 = 0 + ½ a3 = 1
Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2
Example
(37)10 = 100101
Decimal-r Conversion (converting fraction)
Answer = (0.1011)2
Example:
(422)10 = (1A6)16
Binary, Octal and Hexadecimal
• Binary to Octal:
– Group the binary digits into three bit groups starting at the radix
point and going both ways, padding with zeros as needed (at the
ends).
– Convert each group of three bits to an equivalent octal digit.
• Octal to Binary:
– It is done by reversing the preceding procedure
– Restate the octal as three binary digits
– Start at the radix point and go both ways, padding with zeros as
needed.
Examples
• Binary to Hexadecimal:
– Group the binary digits into four bit groups starting at the radix point
and going both ways, padding with zeros as needed (at the ends)
– Convert each group of four bits to an equivalent hexadecimal digit
• Hexadecimal to Binary:
– It is done by reversing the preceding procedure
– Restate the hexadecimal as four binary digits
– Start at the radix point and go both ways, padding with zeros as
needed
Examples
Carry in (Z) of 1: Z 1 1 1 1
X 0 0 1 1
+Y +0 +1 +0 +1
CS 01 10 10 11
Binary Addition Examples
carry: 1
0 0 0 0 0 1 0 0 (4)
+ 0 0 0 0 0 1 1 1 (7)
0 0 0 0 1 0 1 1 (11)
bit position: 7 6 5 4 3 2 1 0
1 1 1 1 1
1 carries
1
1 1 1 0 1
+ 1 0 1 1 1
---------------------
1 0 1 0 1 0 0
Binary Subtraction Example
1 10 borrows
0 10 10 0 0 10
1 00 1 1 0 1
- 1 0 1 1 1
------------------------
1 1 0 1 1 0
Binary Multiplication and Division
• Multiplication table 1
0 1 1 1
0x0=0 X 1 0 1 0
-----------------------
0x1=0 0 0 0 0 0
1x0=0 1 0 1 1 1
1x1=1 0 0 0 0 0
1 0 1 1 1
-----------------------
1 1 1 0 0 1 1 0
0 0 0 0 1 0 1 0 Positive
• Compare the
number of bits
changing when
going from one
number to the
next:
– In Gray code it is
always 1 bit.
ASCII Character Code
P Information Bits
1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1
Added even parity bit Added odd parity bit
Parity Code Example
0 0 1 0 1 0 1 1
Binary Cell
Register Transfer
• We need processing
• We need storage
• We need communication
Binary Logic
AND
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
OR Truth Table
OR
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NOT Truth Table
NOT
A A'
0 1
1 0
Binary Signal