Professional Documents
Culture Documents
Chapter 2 - Foundation of Digital Systems Binary Number Logic - Edt - QS
Chapter 2 - Foundation of Digital Systems Binary Number Logic - Edt - QS
Chapter 2 - Foundation of Digital Systems Binary Number Logic - Edt - QS
P.1
ELEC1010 Electronic & Information Technology
P.2
Analog Signals
• An analog signal represents a physical phenomenon that varies
continuously with time and in amplitude. Examples: the sound
we hear, the visual signal we see, the current generated by the
mouthpiece of a conventional telephone, etc.
• A continuous quantity is not countable – for any two possible
distinct values of the quantity, there are other possible values in
between. A continuous quantity can take on an uncountable
infinite number of values.
P.3
Analog Systems
• A system is analog when the signal is manipulated (e.g.
filtered, modulated, amplified, transmitted, received) as a
continuously changing quantity. Examples:
- Analog TV
- Film camera
P.4
Alexander Graham Bell and his Telephone
• In 1876, Bell invented the telephone. At the mouth piece, a person’s
speech moves a diaphragm which compresses the carbon grains and
changes their electrical resistance, causing changes in the electrical
current flowing through the telephone circuit. At the receiver, the current
drives a magnet which moves a diaphragm to re-create the speech signal.
current
time
P.5
Degradation of Analog Signal
As an electrical telephone signal is transmitted over long distance, it
may suffer degradations in many ways:
•Attenuation – the amplitude of the signal is proportionally reduced
•Distortion – the signal is changed in a non-linear way, caused by
the transmission medium or by the amplifiers
•Noise – some random garbage signal is added because of
electrical interference or other noise sources
Electrical
Blurring because of
Current Random Noise
time
10 ms 20 ms
In the past, the end result was that long-distance phone calls
sounded very poorly! P.6
Demo – Noise and Distortion to Analog Signal
• Below are four versions of a
piece of music Time Domain Signal (enlarge a portion of the original signal)
Time Domain Signal (enlarge a portion of distorted signal)
1.5
0.4
0.3
0.2
1
0.1
-0.1
0.5
-0.2
-0.3
-0.4 0
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
time(s) time(s)
0.4
1.5
0.3
0.2
1
0.1
0 0.5
-0.1
-0.2 0
-0.3
-0.4 -0.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
time(s)
-0.5
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
2
time
P.9
Digital Signals and Systems
• A digital signal is a quantity that is measured in discrete values
at discrete time/space instances – the gender of one or a group
of students in this class, a .bmp computer file, the 64 kilo bits
per second (kbps) telephone signal in the modern telephone
network, etc.
• A true analog signal can have an infinite number of values. Any
finite system must inherently be digital/discrete.
While human touch and feel analog signals, we process
information in digital terms – we make yes/no decision; we
can deal with physical quantities only with finite accuracies.
P.10
Digital Systems for Information Processing
• George Boole (1815 – 1864), an English mathematician,
invented Boolean Algebra, which for many years did not
seem to have any practical use.
P.11
The Benefits of Digitization
• Analog signal cannot be easily duplicated, stored or modified.
• Analog signal, once degraded, cannot be easily corrected.
• Analog systems are bulky and not easily modifiable to solve new
or different tasks.
P.12
Advantages of Digital Communications
• In digital communications, information is a binary (0 or 1)
signal that varies discretely in time.
Transmitted bits:
1 0 0 1 1 0 1 0 0
received signal recovered digital signal
1.0
0.5
time
1 0 0 1 1 0 1 0 0
P.14
Example - Digital Telephony
• Since the 1970s, the core of the telephone network has been
converted into a digital network. Each voice signal is converted
into a digital signal of 64 kilo bits per second (kbps) – each
analog voice signal is sampled 8,000 times per second, and 8
bits are used to represent the amplitude of each sample,
meaning that each sample can be represented by only one of
256 values (28).
current
Analog voice signal
time
0.125 ms
Transmitted Bits
8 bits 64 kbps digital voice signal
time
0.125 ms
P.15
Example: Digital TV - no snowy pictures
Hong Kong started digital TV broadcast in 2007. In USA,
all analog TV broadcast ceased in February 2009!
Traditional Analog TV system
P.16
Example: Digital TV - no ghosting
Besides attenuation, distortion, and noise, wireless transmission of
signals suffers from another degradation known as multi-path
where the receiver receives multiple copies of the original signal
with different delays as the transmitted signal reflects off different
obstacles.
P.17
So how do we “Go Digital”
• That is to ask how to take information such as sounds,
pictures, and text and turn them into numbers?
• Analog systems are bulky and are typically designed for specific
tasks only. Digital systems are highly compact with today’s IC’s
and can be easily programmed to perform different tasks.
P.19
ELEC1010 Electronic & Information Technology
P.20
What is that “b” symbol?
• In the digital world, a bit is the most basic unit of
information.
00 01
11
10
P.22
What is that “B” symbol then?
• A byte (B) = 8 bits
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
P.23
A simple look-up table for power of 2
20 = 1
21 = 2
22 = 4
23 = 8
24 = 16
25 = 32
26 = 64
27 = 128
28 = 256
29 = 512
210 = 1024
P.24
Math we are familiar with: Base 10 System
• Base-10 system uses powers of 10 and the digits are 0, 1, 2, …, 9.
• It is also known as the decimal system
• The number 238 in the decimal system means:
P.25
Math digital devices are familiar with: Base 2 System
(Binary Numbers)
e.g. What is the binary number 1101 (a 4-bit number) in base 10?
1 x 23 = 8
1 x 22 = 4
0 x 21 = 0
1 x 20 = 1
P.26
Another example on base 2: an 8-bit number
e.g. What is the above binary number (a 8-bit number) in base 10?
Hence, 361 = 1 0 1 1 0 1 0 0 1
P.28
Examples: Conversion from base10 to base 2
e.g. How to convert 14 in base-10 to a binary number?
14 = 8 + 6 = 8 + 4 + 2
= 256 + 64 + 32 + 8 + 1
P.30
Binary Logic
• Latest computer chips are composed of billions of transistors
(electronic switches at the tens of nanometers scale), and
each transistor can be used to represent a “0” or “1” (“off” or
“on”).
• The problem now turns to how those “0” and “1” work together
to make our computers so powerful!
Standard __
A B
BA Pronounced commonly
as “A bar”, “A not”, or
Abbreviated B
“not A”
A
3.Truth Table
A B Truth Table
-- how a logic circuit's output
1 0 responds to various
0 1 combinations of the inputs
P.32
Logic operation – AND
• Two Inputs (A,B), One Output (C)
B
C C A B Pronounced
“C equals A and B”
Truth Table
A B C
0 0 0
0 1 0
1 0 0
1 1 1
P.33
Logic operation – OR
• Two Inputs (A,B), One Output (C)
A
C C A B Pronounced
B “C equals A or B”
Truth Table
A B C
0 0 0
0 1 1
1 0 1
1 1 1
P.34
Building more Complex Logic Operation – Example 1
__
D ( A B) C
Truth Table
__ __
A B ( A B) C C D ( A B) C
0 0 0 0 1 1
0 0 0 1 0 0
0 1 0 0 1 1
0 1 0 1 0 0
1 0 0 0 1 1
1 0 0 1 0 0
1 1 1 0 1 1
1 1 1 1 0 1
P.35
Logic operation – Example 1
Symbol Diagram
A ( A B)
B
D
__
C
C
P.36
Example 2: 7-Segment LED Digit Display
• Found in your digital watch, clock, scoreboard, etc.
• Consists of seven LED (Light-Emitting Diode) segments
• We want to light up the display based on the input digit – 4-bit input (4
bits to specify the digit 0-9) and 7-bit output (on/off for each segment)
P.37
Truth Table
a
f b
g
e c
d
P.38
Logic Diagram D
B
Approximately how
many gates are there? A
Note the followings:
O is an abbreviated notation
for the inverter
Some gates have 3 – 4 inputs!
We can insist of using
gates with 2 inputs only but
the diagram will look more
complicated.
P.39
0 1
Logic Diagram D
0
0 1
C
0
0 1
B 0
0
1
A
0
0 0
1
1 1
0 0
𝑒 𝐵 · 𝐶̅ · 𝐷
P.40
1 0
Logic Diagram D
1
0 1
C
0
0 1
B 0
0
1
A
0
1 1
0
1 1
0 0
P.41
0 1
Logic Diagram D
0
1 0
C
1
0 1
B 0
0
1
A
0
0 0
1
1 0
0 0
P.42
1 0
Logic Diagram D
1
1 0
C
1
0 1
B 0
0
1
A
0
1 1
0
1 0
0 0
P.43
0 1
Logic Diagram D
0
1 0
C
1
1 0
B 1
0
1
A
0
0 0
1
1 0
1 0
P.44
0 1
Logic Diagram D
0
0 1
C
0
0 1
B 0
1
0
A
1
0 0
1
1 1
0 0
P.45
𝐶. 𝐴
Logic Diagram D
𝐷. 𝐵
𝐷 · 𝐶̅ · 𝐵 · 𝐴̅
𝑎 𝐴̅ · 𝐵 · 𝐶̅ · 𝐷 · 𝐵 · 𝐷 · 𝐴 · 𝐶
P.46
Power of Modern Digital Processing
• All digital operations can be expressed by truth tables
and implemented by logic gates. There are algorithms
to reduce the number of gates. Modern technologies
allow us to integrate hundreds of millions of gates on a
tiny device called an integrated circuit (IC)!
P.47
Integrated Circuit Example
• Intel i9 Processor: Skylake
• Fabrication process: 14nm
CMOS process
• i9-7980XE: 18 core, 2.6GHz,
165W
• Die photo
https://en.wikipedia.org/wiki/Skylake_(microarchitecture)
P.48
Integrated Circuit Fabrication
• Foundry: fabricate IC on
silicon wafers
• Photolithography
technologies
– Diffraction
• Line width
– µP: 14nm
– iPhone: 16nm
– TSMC: 10nm, 2016Q3
5nm, 2019E
– Intel: 10nm, 2018E
Caution: technology node beyond 28 nm is not
equal to the minimum lateral feature on the chip.
https://en.wikichip.org/wiki/technology_node
https://en.wikipedia.org/wiki/Semiconductor_device_fabrication
P.49
System on a Chip (SoC)
Snapdragon is a suite of system on a chip (SoC) semiconductor products for
mobile devices designed and marketed by Qualcomm Technologies Inc. The
Snapdragon central processing unit (CPU) uses the ARM RISC. A single SoC
may include multiple CPU cores, an Adreno graphics processing unit (GPU),
a Snapdragon wireless modem, a Hexagon Digital signal processor (DSP), a
Qualcomm Spectra Image Signal Processor (ISP) and other software and
hardware to support a smartphone's global positioning system (GPS),
camera, video, audio, gesture recognition and AI acceleration.
P.52