Lecture 1 - IntroChapter 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Faculty of Engineering and Technology

Electrical Engineering Department

ELE 215 – Logic Design


and Digital Circuits
Lecture 1- Introduction

Dr. Nermin Salem


[email protected]
Course Outline •

Electronic Systems
Journey of Computers
• Moore’s Law
• Abstraction
• Introduction • Analog Vs Digital systems
• Numbering System • Administrative
➢ People (instructor, TA(s))
• Logic Gates and Gate-Level Minimization ➢ Course Objectives and
• Boolean Algebra Outlines
➢ Website(s)
• K-maps ➢ Reading Material
• Combinational Logic ➢ Classwork and Grading
➢ Assignments
• Synchronous Sequential Logic ➢ Course Project
➢ Exam dates
• Registers and Counters • Electronic Systems!
• Memories and Programmable Logic
Nermin Salem ELE 215 - L1 2
Outcomes – By the end of this course the student should, be able to:
a. Knowledge and Understanding
a1. Describe different number systems: positional notation, binary number systems, number base conversion, octal and
hexadecimal, negative numbers, coded number systems.
a2. Discuss switching functions: main operators, postulates and theorems.
a3. Explain analysis and design of combinational circuits and their applications.
a4. Explain analysis and design of sequential circuits and their applications.

b. Intellectual Skills
b1. Solve problems related to different number systems and its different applications.
b2. Analyze problems related to different combinational circuits and their different applications.
b3. Analyze problems related to different sequential circuits and their different applications.
b4. Design digital circuits using professional software tools.

Nermin Salem ELE 215 - L1 3


Outcomes – By the end of this course the student should, be able to:
c- Professional and Practical Skills
c1. Clarify theories and techniques of mathematics to solve digital circuit problems.
c2. Build the components and requirements for designing a complete digital circuit.
c3. Develop the design and implementation of digital circuits using software tools and measuring instruments.
c4. Seek thoroughly datasheets and identify appropriate specifications for required digital circuits either combinational circuits or
sequential circuits.

d- General and Transferable Skills:


d1. Collaborate effectively within multidisciplinary team
d2. Communicate effectively.
d3. Effectively manage tasks, time, and resources.
d4. Search for information and engage in life-long self-learning discipline.

Nermin Salem ELE 215 - L1 4


People
• Instructor:
• Dr. Nermin Salem, PhD
• Email: [email protected]
• Office hours: B4.9 (Saturday, Sunday and Monday) otherwise by email
appointment.
• Assistant:
• Eng. Mohamed Mousa
• Email: [email protected]
• Office hours:

Nermin Salem ELE 215 - L1 5


Introduction
• Logic Circuits are in
Everyday life

(Source: http://www.hitachi-hightech.com/global/products/device/semiconductor/life.html)

Nermin Salem ELE 215 - L1 6


Electronic Systems

(Source: https://www.apple.com/ipad/)

Nermin Salem ELE 215 - L1 7


Opening the
Box

Components of the Apple iPad 2

(Source: ihsmarkit.com)

Nermin Salem ELE 215 - L1 8


Opening the
Box
μP!
First microprocessor
• Microprocessors have revolutionized our world during by Intel, the 4004
0.7 MHz
the past three decades.

• A laptop computer today has far more capability than a


room-sized mainframe of yesteryear. Intel, the 80486
400 MHz
• A luxury automobile contains about 50 microprocessors.

• Advances in microprocessors have made cell phones and


the Internet possible, have vastly improved medicine,
ARM Processor
and have transformed how war is waged. https://tinyurl.com/y83b2llt

Nermin Salem ELE 215 - L1 10


Computer– Journey.
1833 1945 2019

Single Board Computers


https://en.wikipedia.org/wiki/ARM_architecture

Electronic Numerical Integrator and Computer


The machine was huge, weighing 30 tons, using
200 kilowatts of electric power and contained over
18,000 vacuum tubes, 1,500 relays, and hundreds
of thousands of resistors, capacitors, and inductors
https://tinyurl.com/y6jnahhk

Analytical Engine
https://tinyurl.com/y6jnahhk
Nermin Salem ELE 215 - L1 11
Number of Transistors!
MOSFET scaling
(process nodes)
•10 µm – 1971
•6 µm – 1974
•3 µm – 1977
• 1.5 µm – 1981
•1 µm – 1984
•800 nm – 1987
•600 nm – 1990
•350 nm – 1993
•250 nm – 1996
•180 nm – 1999
•130 nm – 2001
•90 nm – 2003
•65 nm – 2005
•45 nm – 2007
•32 nm – 2009
•22 nm – 2012
•14 nm – 2014
•10 nm – 2016
•7 nm – 2018
•5 nm – 2020
•Future3 nm –
~2022

Nermin Salem ELE 215 - L1 https://en.wikipedia.org/wiki/Moore%27s_law 12


Abstraction

Nermin Salem ELE 215 - L1 13


Abstraction Hiding details when they are not important.

• Levels of Abstraction
1. The physics, the motion of electrons. The behavior of electrons is
described by quantum mechanics and Maxwell’s equations.
2. Our system is constructed from electronic devices such as transistors.
These devices have well-defined connection points called terminals and
can be modeled by the relationship between voltage and current as
measured at each terminal. In this device level, we can ignore the
individual electrons.
3. The next level of abstraction is analog circuits, in which devices are
assembled to create components such as amplifiers. Analog circuits input
and output a continuous range of voltages.
4. Digital circuits such as logic gates restrict the voltages to discrete ranges,
which we will use to indicate 0 and 1.
5. In logic design, we build more complex structures, such as adders or
memories, from digital circuits.
6. Microarchitecture links the logic and architecture levels of abstraction.

Nermin Salem ELE 215 - L1 14


Abstraction – ELE 215

ELE 215

Nermin Salem ELE 215 - L1 15


What is Digital?
• Digital Quantity is one having a discrete set of values.

• In order to obtain a digital signal → we need to digitize the analog


quantities as most things that can be measured quantitatively occur in
nature in analog form.
Nermin Salem ELE 215 - L1 16
Analog Vs. Digital
• An analog signal is any variable signal that is continuous in both time
and amplitude. e.g., Sound.

Example:
• Analog: Voice form a microphone
• Digital: Bits stored on a CD

Nermin Salem ELE 215 - L1 17


Why Digital?

• Digital Systems are easier to


design and implement than
analog systems.
• Digital Data can be
processed and transmitted
more efficiently and reliably
than analog data.
• Digital Data has a great
advantage when storage is
necessary. Not all audio and video signals are analog. Standardized signals
for video (like HDMI) and for audio (like MIDI, I2S, or
AC’97) are all digitally transmitted.
Nermin Salem ELE 215 - L1 18
Website
• The course materials (Lectures, exercises, labs,….) will be posted on
LMS (moodle).
↗ It is your responsibility to check the course page on moodle regularly for
any announcements or material!
↗ It is highly recommended to install Moodle Mobile application on your
phone to keep up to date - receive instant notifications of messages and other
events, such as assignment submissions.
• available for Android and iOS on Google Play and App Store.

• If you have a question, your best option is to post a message on


moodle. The instructor will check the forum regularly, and if you use
the forum, other students will be able to help you too.

Nermin Salem ELE 215 - L1 19


Recommended Textbook
Nermin Salem ELE 215 - L1 20
Classwork and Grading

Earn extra-credit engagement points,


awarded at the discretion of the
instructor: Bonus

Nermin Salem ELE 215 - L1 21


Lab Work and Course Project
• Practice and Lab assignments are performed using Logisim.
• Logisim is an educational tool for designing and simulating digital
logic circuits.
• The aim of the course project is to:
• Design
• Simulate (using the tools you will learn in the Lab)
• Implement (in Hardware)
• Will be discussed soon

Nermin Salem ELE 215 - L1 22


What is Logic Design?
Given a specification of a problem → come up with a solution
methodology followed by choosing appropriately from a collection of
available components while meeting some criteria such as:
➢Size
➢Cost
➢Power

What is Logic Components?


Digital Logic Gates, are the basic
unit to build any digital circuit.

Nermin Salem ELE 215 - L1 23


Digital Logic Gates
• The Digital logic circuit composed of
hardware components that manipulate
binary information.
• These components are called Gates.
• Digital Systems are mainly a black box
with minimum one input and minimum
one output.
• Inside this box, are millions of switches
called Transistors.
• Transistors perform different functions AND GATE IC
according to Inputs. 7408
• In binary logic circuits there are only two
levels: 0 and 1.

Nermin Salem ELE 215 - L1 24


What’s the physical meaning of logic 0 and logic 1?
How could we recognize them?
Electrical Signals:
a. voltages
b. Currents
that exist throughout a digital system is in either of two
recognizable values [ logic 1 or logic 0 ].
Digital Logic
Levels

Nermin Salem ELE 215 - L1 25


Numbering System
• Decimal System: (Base = 10)
• Largest number = base – 1 = 9
• Decimal digits are 0,1,2,3,…, 9
• Binary Numbering System: (Base = 2)
• Largest number = base -1 = 1
• Binary digits are 0, 1.
• Octal Numbering System: (Base = 8)
• Largest number = base -1 = 7
• Octal digits are 0, 1, 2, 3, …, 7.
• Hexadecimal Numbering System: (Base = 16)
• Largest number = base -1 = 15
• Hexadecimal digits are 0, 1, 2, 3, …, 9, A, B,…., F.

Nermin Salem ELE 215 - L1 26


Conversions Methods
Method 1:
From any base to decimal → Weight Equation
𝑎𝑛 𝑟 𝑛 + 𝑎𝑛−1 𝑟 𝑛−1 + … + 𝑎2 𝑟 2 + 𝑎1 𝑟1 + 𝑎0 𝑟 0 + 𝑎−1 𝑟 −1 + 𝑎−2 𝑟 −2 + …
+ 𝑎−𝑚 𝑟 −𝑚
where a is the number magnitude, n is the position and r is the base of the
number.
Examples: Convert the following bases into decimal:
1. (4021.5)5 = 4 ∗ 53 + 0 ∗ 52 + 2 ∗ 51 + 1 ∗ 50 + 5 ∗ 5−1 = (512)10
2. (127.4)8 = 1 ∗ 82 + 2 ∗ 81 + 7 ∗ 80 + 4 ∗ 4−1 = (87.5)10
3. (B65F)16 = B ∗ 163 + 6 ∗ 162 + 5 ∗ 161 + F ∗ 160 = (46687)10
4. 110101 2 = 1 ∗ 25 + 1 ∗ 24 + 0 + 1 ∗ 22 + 0 + 1 ∗ 20 = (53)10

Nermin Salem ELE 215 - L1 27


Conversions Methods (Cont.)
From Octal to Binary From Binary to Octal

Each group of 3 bits represents Expand each group of 3 bits to


an octal digit. represent an octal digit.
Method 2:
Example: Convert the octal Example: Convert the binary
number (26.2)8 into binary. number 10110.01 2 into
Octal

Nermin Salem ELE 215 - L1 28


Conversions Methods (Cont.)
From Hexadecimal to Binary From Binary to Hexadecimal

Each group of 4 bits represents Expand each group of 4 bits to


an octal digit. represent an octal digit.

Method 3:
Example: Convert the Example: Convert the binary
hexadecimal number (16.4)16 number 10110.01 2 into
into binary. hexadecimal
(1 6 . 4 )16

( 0001 0 1 1 0 . 0100 )2
Nermin Salem ELE 215 - L1 29
Method 4: Long Division
Conversions A) Integer Numbers:
Methods (Cont.) Example: Convert decimal 41 to binary

Calculations:

Nermin Salem ELE 215 - L1 30


Conversions Methods Example 2: Convert decimal 153 to
octal
(Cont.)

YOU WILL DIVIDE BY 8

Nermin Salem ELE 215 - L1 31


Conversions Methods (Cont.)
B) Fractional Numbers:
Example: Convert (0.6875)10 to binary

Therefore, the answer is (0.6875)10 = (0.1011)2

Nermin Salem ELE 215 - L1 32


Conversions Methods (Cont.)
Example: Convert (0.513)10 to octal

The answer, to seven significant figures, is obtained from the integer part of the
products:
(0.513)10 = (0.406517)8
Nermin Salem ELE 215 - L1 33
Complements
• Complements are used in digital computers to simplify the subtraction
operation and for logical manipulation.
Simplifying operations
leads to simpler, less
expensive circuits to
implement the
operations.

• There are two types of complements for each base‐r system:


• Radix Complement (r s’ complement)
• Diminished Radix Complement ((r-1) s’ complement)

Nermin Salem ELE 215 - L2 34


Diminished Radix Complement
Given a number N in base r having n digits, the (r - 1) complement of N,
i.e., its diminished radix complement, is defined as (𝑟 𝑛 − 1) − 𝑁.
For Decimal numbers: r = 10 and r – 1 = 9
∴ 9th Complement of N = (10𝑛 − 1) − 𝑁
Examples:
1. The 9 s’ complement of 546700 is (999999 – 546700) = 453299
2. The 9 s’ complement of 012398 is (999999 – 012398) = 987601

Nermin Salem ELE 215 - L2 35


Diminished Radix Complement
For Binary numbers: r = 2 and r – 1 = 1
∴ 1 s’ Complement of N = (2𝑛 − 1) − 𝑁
∴ the 1’s complement of a binary number is formed by changing 1’s to 0’s and 0’s to 1’s.

Examples:
1. The 1’s complement of 1011000 is 0100111
2. The 1’s complement of 0101101 is 1010010

Nermin Salem ELE 215 - L2 36


Radix Complement
The r’s complement of an n‐digit number N in base r is defined as (r n - N) for N ≠ 0
and as 0 for N = 0.
Examples:
1. The 10’s complement of 012398 is 987602
2. The 10’s complement of 246700 is 753300

Similarly, the 2’s complement can be formed by leaving all least significant 0’s and
the first 1 unchanged and replacing 1’s with 0’s and 0’s with 1’s in all other higher
significant digits.
Examples:
1. The 2’s complement of 1101100 is 0010100
2. The 2’s complement of 0110111 is 1001001

Nermin Salem ELE 215 - L2 37


Subtraction with Complements
The subtraction of two n‐digit unsigned numbers M - N in base r can be done as
follows:
1. Add the minuend M to the r’s complement of the subtrahend N. Mathematically,
M + (r n – N) = M – N + r n.
2. If M ≥ N, the sum will produce an end carry r n , which can be discarded; what
is left is the result M – N .
3. If M < N, the sum does not produce an end carry and is equal to r n – (N – M),
which is the r’s complement of (N – M).
To obtain the answer in a familiar form, take the r’s complement of the sum and
place a negative sign in front.

Nermin Salem ELE 215 - L2 38


Example
Using 10’s complement, subtract 72532 - 3250.

Nermin Salem ELE 215 - L2 39


Example
• Using 10’s complement, subtract 3250 - 72532.

• Given the two binary numbers X = 1010100 and Y = 1000011, perform the
subtraction: (a) X - Y and (b) Y - X by using 2’s complements.
There is no end carry. Therefore,
the answer is Y - X = - (2 s’
complement of 1101111) =
- 0010001

Nermin Salem ELE 215 - L2 40


Signed Binary Numbers
There are three ways to represent a
negative number:
1. Sign and Magnitude
2. One s’ Complement
3. Two s’ Complement

Although, there is only one way to


represent +9, there are three different
ways to represent -9 with eight bits:
• signed‐magnitude representation: 10001001
• signed‐1’s‐complement representation:
11110110
• signed‐2’s‐complement representation:
11110111
Nermin Salem ELE 215 - L2 41
Binary Signed Numbers
• Example:
For 4-bit binary encodings

Unsigned

2’s Complement

Signed Magnitude

Nermin Salem ELE 215 - L2 42


Example

Using 1’s complement, with X = 1010100 and Y = 1000011

Nermin Salem ELE 215 - L2 43


Example
Using 2’s complement, with X = 1010100 and Y = 1000011

subtract X – Y subtract Y – X

X→ 1010100 Y→ 1000011
+ +
2’s complement of Y → 0111101 2’s complement of X → 0101100
----------------------- -----------------------
Sum → 10010001 Sum → 1101111
Discard end carry No carry
Answer → 10001 Answer is the –(2’s complement of 1101111)→ –10001

Nermin Salem ELE 215 - L2 44


Binary Code Decimal (BCD)

Nermin Salem ELE 215 - L2 45


BCD Addition
Consider the following three BCD additions:

Add 6 to
adjust the
number
Needs Adjusting to be from 0-9

Nermin Salem ELE 215 - L2 46


BCD Addition
Consider the addition of 184 + 576 = 760 in BCD

Nermin Salem ELE 215 - L2 47


Gray Code
The advantage of the Gray code over the straight
binary number sequence is that only one bit in
the code group changes in going from one
number to the next.

Nermin Salem ELE 215 - L2 48


ASCII Character Code
• The standard binary code for the alphanumeric characters is the American Standard Code
for Information Interchange (ASCII), which uses seven bits to code 128 characters.
• The seven bits of the code are designated by b1 through b7, with b7 the most significant
bit.
• The letter A, for example, is represented in ASCII as 1000001 (column 100, row 0001).
• The ASCII code also contains 94 graphic characters that can be printed, and 34
nonprinting characters used for various control functions.
• The graphic characters consist of:
• 26 uppercase letters (A through Z)
• 26 lowercase letters (a through z)
• 10 numerals (0 through 9)
• 32 special printable characters, such as %, *, and $

Nermin Salem ELE 215 - L2 49


ASCII Character Code

Example:
ASCII code of N = 100 1110

Nermin Salem ELE 215 - L2 50


Error‐Detecting Code
To detect errors in data communication and processing, an eighth bit is sometimes
added to the ASCII character to indicate its parity. A parity bit is an extra bit
included with a message to make the total number of 1’s either even or odd.
Consider the following two characters and their even and odd parity:

In each case, we insert an extra bit in the leftmost position of the code to produce an
even number of 1’s in the character for even parity or an odd number of 1’s in the
character for odd parity. In general, one or the other parity is adopted, with even
parity being more common.

Nermin Salem ELE 215 - L2 51


Error‐Detecting Code
1. The parity bit is helpful in detecting errors during the transmission of
information from one location to another.
2. This function is handled by generating an even parity bit at the sending end for
each character.
3. The eight‐bit characters that include parity bits are transmitted to their
destination.
4. The parity of each character is then checked at the receiving end.
5. If the parity of the received character is not even, then at least one bit has
changed value during the transmission.
This method detects one, three, or any odd combination of errors in each character
that is transmitted.
An even combination of errors, however, goes undetected, and additional error
detection codes may be needed to take care of that possibility.

Nermin Salem ELE 215 - L2 52


References
‒ M. Mano and M. Ciletti, Digital Design, with an introduction to the
Verilog HDL. 5th Ed. Pearson, 2013.
‒ John F. Wakerly, Digital Design: Principles and Practices. 4th Ed.
Pearson, 2005.
‒ R. Katz and G. Boriello, Contemporary Logic Design. 2nd Ed.
Pearson, 2005.

Nermin Salem ELE 215 - L2 53


Thank You

Nermin Salem ELE 215 - L1 54

You might also like