how 1s and 0s rule the world utku altunkaya. outline introduction basic logic operations logic...
TRANSCRIPT
![Page 1: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/1.jpg)
HOW 1s AND 0s RULETHE WORLD
Utku Altunkaya
![Page 2: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/2.jpg)
Outline
Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital Signals and
Systems Implementation Technologies for
Digital Circuits
![Page 3: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/3.jpg)
Introduction
All digital systems are built around the fundamentals of the base-2 (binary) number system, which uses only 1s and 0s to represent numbers.
Anything that can be expressed as a binary number can be processed by a digital system.
![Page 4: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/4.jpg)
Introduction
Here are a few concepts and acronyms related to digital systems that are widely used in daily life:
Bits, bytes, kilo-, mega-, and gigabytes
Microprocessors, RAM, ROM CD-ROM, CD- Audio, MP3 compression DVD, MPEG and DivX compression Internet, modem, ADSL, kbps, mbps…
![Page 5: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/5.jpg)
Logic OperationsTHE AND GATEThe AND gate implements the Boolean AND function where the output is logic 1 only when all inputs to the AND gate are logic 1.
The standard symbol and the truth table for a two-input AND gate is:
The Boolean expression for the AND gate is Y = A · B
![Page 6: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/6.jpg)
Logic OperationsTHE OR GATE
The OR gate implements the Boolean OR function where the output is logic 1 when any input to the OR gate is logic 1.
The standard symbol and the truth table for a two-input OR gate is:
The Boolean expression for the OR gate is Y = A + B
![Page 7: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/7.jpg)
Logic OperationsTHE NOT GATEThe NOT gate (Inverter) implements the Boolean NOT function where the output is the inverse of the input. The standard symbol and the truth table for the NOT gate is:
The Boolean expression for the NOT gate is Y = A’.
From these three basic logical gates it is possible to implement any Boolean expression in hardware. Some simple combinations of these functions have their own gate names and symbols; these are NAND, NOR, XOR, and XNOR gates.
![Page 8: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/8.jpg)
Logic OperationsTHE NAND GATE The NAND gate is an AND gate followed by a NOT gate. The output of a NAND gate is logic 0 when all inputs are logic 1.
The standard symbol and the truth table for a two-input NAND gate is:
The Boolean expression for the NAND gate is Y = (A · B)’
![Page 9: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/9.jpg)
Logic OperationsTHE NOR GATE The NOR gate is a combination of an OR followed by a NOT gate. The output is logic 0 when any of the inputs is logic 1.
The standard symbol and the truth table for a two-input NOR gate is:
The Boolean expression for the OR gate is Y = (A + B)’
![Page 10: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/10.jpg)
Logic OperationsTHE XOR GATE (EXCLUSIVE-OR)The output of this gate is logic 1 if an odd number of its inputs are logic 1; otherwise, the output of this gate is logic 0.
The standard symbol and the truth table for a two-input XOR gate is:
The Boolean expression for the XOR gate is Y = (A · B’) + (A’ · B)
![Page 11: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/11.jpg)
Logic OperationsTHE XNOR GATE (EXCLUSIVE-NOR)The output of this gate is logic 1 if an even number of its inputs are logic 1; otherwise, the output of this gate is logic 0.
The standard symbol and the truth table for a two-input XNOR gate is:
The Boolean expression for the XOR gate is Y = [(A · B’) + (A’ · B)]’
![Page 12: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/12.jpg)
Logic CircuitsA logic circuit is a compound circuit consisting of
the basic logic gates AND, OR, NOT, NAND, NOR, XOR, and XNOR.
A combinational logic circuit produces its output according to the logic values of its current inputs. The 'past' inputs do not influence the output of the circuit.
Circuits that are able to 'remember' the past are called sequential circuits.
![Page 13: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/13.jpg)
Logic Circuits
A B CL=(A ·
B)’M=A+B
N=(L · M)’
P=N+CQ=(N ·
C)’R=(P ·
Q)’
0 0 0 1 0 1 1 1 0
0 0 1 1 0 1 1 0 1
0 1 0 1 1 0 0 1 1
0 1 1 1 1 0 1 1 0
1 0 0 1 1 0 0 1 1
1 0 1 1 1 0 1 1 0
1 1 0 0 1 1 1 1 0
1 1 1 0 1 1 1 0 1
![Page 14: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/14.jpg)
Base-2 (Binary)Number System
![Page 15: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/15.jpg)
Analog vs. Digital
A continuous valued signal is called an analog signal.
A discrete time, quantized and binary coded signal is called a digital signal.
![Page 16: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/16.jpg)
Analog to Digital: Sampling
The figure at the right shows a continuous-
time, analog (continuous-valued)
signal.
![Page 17: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/17.jpg)
Analog to Digital: Sampling
The first step in digitizing an analog
signal is sampling, which is done by taking
samples of the original analog signal at equally
spaced, fixed points in time.
![Page 18: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/18.jpg)
Analog to Digital: Sampling
The time distance between these sampling
points is called the sampling period, and the
number of samples taken per second is
denoted as the sampling frequency.
Sampling period is the inverse of the sampling
frequency: Ts=1/fs
![Page 19: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/19.jpg)
Analog to Digital: Sampling
As the sampling period gets smaller (and thus
the sampling frequency gets higher) the
sampled signal provides a better and better
representation of the original signal.
![Page 20: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/20.jpg)
Analog to Digital: Sampling
The samples are still analog in nature, but together they form a discrete-time signal.
The sampled signal must now be quantized,
and then binary codes must be assigned to
each sample to obtain the digital signal.
![Page 21: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/21.jpg)
Analog to Digital: Quantization
Quantization is achieved by rounding the value of
each sample to a predetermined
quantization level.
![Page 22: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/22.jpg)
Analog to Digital: Quantization
The range between the minimum and maximum
values of the signal is divided into a number of
equally spaced levels, and the distance
between two adjacent levels is called the quantization step.
![Page 23: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/23.jpg)
Analog to Digital: Quantization
As the number of quantization levels
increase, the quantization step gets
smaller, enabling a better representation of
the original signal.
![Page 24: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/24.jpg)
Analog to Digital: Quantization
The result of the quantization operation is
a discrete-valued,discrete-time signal.
Finally, to obtain the digital signal, each
quantization level will now be assigned a
unique binary number code.
![Page 25: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/25.jpg)
Analog to Digital: Coding
In this example, the sampled signal is
quantized using 0.01V steps between the
values 0V to 2.55V, giving 256 discrete quantization levels.
These levels are then numbered using 8-bit binary codes ranging
from 0 (0000 0000) to 255 (1111 1111).
![Page 26: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/26.jpg)
Analog to Digital: Coding
The digital representation of the
analog signal is thus a series of 1s and 0s
forming 8-bit (1 byte) binary numbers for each
sample.
This information can now be stored in a file
on a computer, or transmitted over the
Internet.
![Page 27: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/27.jpg)
Digital InformationThe amount of data required to represent a
digital signal is determined by the signal’s sampling frequency and the number of quantization levels. As these increase, so does the amount of data.
In order to keep the amount of required data as small as possible, sampling frequency and quantization levels must be carefully chosen and these quantities should be no more than what is absolutely necessary to represent the analog signal to be digitized.
![Page 28: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/28.jpg)
Digital InformationAs an example, Audio CDs use 16-bit samples
and the sampling frequency is 44.1 kHz. Since the audio recording is stereo, two channels (left and right) are digitized and stored on the CD. The amount of data required for 1 second of audio is thus:
2 channels x 16 bits/sample x 44100 samples/s= 1411200 bits/s = 1.35Mbits/s
1411200 bits/s = 176400 (1411200 / 8) bytes/s= 172.27 Kbytes/s
![Page 29: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/29.jpg)
Implementation Technologies for Digital Circuits
Programmable Logic Devices Application Specific Integrated
Circuits Microprocessors & Microcontrollers Digital Signal Processors FPGAs
![Page 30: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/30.jpg)
Your Questions
![Page 31: HOW 1s AND 0s RULE THE WORLD Utku Altunkaya. Outline Introduction Basic Logic Operations Logic Circuits Base-2 (Binary) Number System Analog vs. Digital](https://reader036.vdocuments.site/reader036/viewer/2022062511/5519b8cf5503466f578b48c5/html5/thumbnails/31.jpg)
Thank You