Lecture 1
Lecture 1
Lecture 1
Logic Design
DR . S OHA A HME D E HS SAN
AS S ISTANT P ROF ESSOR, COMP UT E R S CI E NCE DE PARTMENT.
FACULT Y OF COM P U T E RS A N D A RT I F ICIA L I N T EL LI GENCE . HE LWA N U N I V ERS ITY
The importance of logic design
➢Electronic system consists of hardware and software
➢To learn how to design the hardware, you need to study
Logic design
➢To learn how to study software, you need to study
Programming Languages
Course Objectives
Students, by the end of the course, should be able to:
Analyze,
Design,
and Implement,
Combinational and Synchronous digital circuits.
References
Text Book
Mano, M. M. and Ciletti, M. D. (2007), Digital design, Upper Saddle River, NJ: Prentice-Hall, 5th ed.
References
S. Brown , Z. Vranesic, “Fundamentals Of Digital Logic With VHDL Design”, ISBN 0-07-012591-0.
G. Langholz, A. Kandel, & J. L Mott, “Foundations of digital logic design”, ISBN 981-02-3110-5.
D. J. Comer, “Digital Logic and State Machine Design”, ISBN 978-0195107234.
Thomas L. Floyd, “Digital Fundamentals”, ISBN 978-0131946095
Grading policy
◦Mid-term Exam 30 %
◦Semester Work 20 %
◦Final-Exam (Written) 50 %
Microsoft Teams Code
Course Contents
1.Basic Logic Concepts
2.Combinational Logic Design
3.Sequential Circuits
4.Registers and Counters
5.Memories
What is meant by digital?
Digital describes electronic technology that generates, stores,
and processes data in terms of two states: ON (1) , OFF (0)
Difference between Analogue and Digital
➢While analog systems represent data using a continuous signal,
digital systems represent data using discrete values ( 0s and 1s)
Digital Logic Basic Operations
The three basic logical operations are:
◦ AND
◦ Ex: z = x . y or z=xy “z is equal to x AND y”
◦ OR
◦ Ex: z = x + y “z is equal to x OR y”
◦ NOT
◦ Ex: z=x or z=x’ “z is equal to NOT x ”
10
Truth table
It is a table of all possible combinations of the variables
It shows the relation between
◦ The values that the variables may take and
◦ The result of the operation
11
Timing Diagram
12
Logic Gate Symbols
13
More Logic Gates
14
Example
Draw a logic gate circuit of A’ +B and get their truth table
A B A’ Z= A’ +B
0 0 1 1
0 1 1 1
1 0 0 0
1 1 0 1
15
Signed integer representation
0 1110010 (114)
Example: Add 110011112 (-79) to 011000112 (99) using signed-magnitude arithmetic.
0112 ⇐ borrows
0 1100011 (99)
1 - 1001111 (-79)
_____________
0 0010100 (20)
One’s Complement
A positive number in one’s complement (C1), is directly converted to its binary
representation. The result of this positive number is the same as that of the
signed magnitude representation.
Example Express 2310 and -910 in 8-bit binary one’s complement form.
Answer:
2310 = + (000101112) = 00010111C1
-910 = - (000010012) = 11110110C1
One’s Complement
Example: What is the decimal equivalent of the C1 number 11110110 ?
Answer: Here, you can notice that the MSB is 1. Then, you must
complement all the bits of the C1 number first, and then find the
equivalent value in decimal. Finally, remember to add the negative
sign.
11110110C1
Complement: 000010012
Convert :9
Include (-) : -9
One’s Complement
Example 1: Add 2310 to -910 using 8-bit binary one’s complement
arithmetic .
Summary:
Although the “end carry around” adds some
complexity, one’s complement is simpler to
implement than signed magnitude.
Nevertheless, it still has the disadvantage of having
two different representations for zero: positive zero
and negative zero (00000000 & 11111111).
Two’s complement solves this problem.
Two’s Complement
Example: Express 2310, -2310, and -910 in 8-bit binary two’s complement
form.