#1 Basics of Number Systems, Boolean Algebra and Logic Gates.pptx
#1 Basics of Number Systems, Boolean Algebra and Logic Gates.pptx
&
Logic Design
(CSPC-201)
Number System, Boolean Algebra and
Logic Gates
Numerical values can be represented by analog or digital.
A digital signal is a discrete signal (step by step), and an analog signal is a continuous signal.
Digital means electronic technology that generates, stores, and processes data in terms of two
states: positive (represented by the number 1 ) and non-positive (represented by the number 0).
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 2
Computer Components
A computer consists of two components: hardware and software.
◦ Hardware refers to the physical components of a computer such as the keyboard, CPU, and memory.
◦ Software refers to programs run by CPU including operating systems and application programs.
Source:
Internet
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 3
The input device is used for entering information into memory. The input device converts
information into bits, and the bits are stored in memory.
A computer’s memory transfers information to the output device in the form of bits. The output
device converts bits to characters, images, and voices which can be interpreted by humans.
Memory is used to store information and programs. Memory comes in the form of solid-state
electronics such as RAM, ROM, flash drive, or hard disk.
The Central Processing Unit (CPU) is used to perform computations on information.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 4
Analog Signals
An analog signal is a signal whose amplitude is a function of time and changes gradually as time
changes.
◦ Nonperiodic Signal: In a nonperiodic signal, there is no repeated pattern in the signal.
◦ Periodic Signal: A signal that repeats a pattern within a measurable time period is called a periodic
signal, and completion of a full pattern is called a cycle.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 5
Characteristics of an Analog Signal
Frequency
Frequency (F) is the number of cycles in 1 s, F =1/T, represented in Hz (Hertz). If each cycle of an analog
signal is repeated every 1 s, the frequency of the signal is 1 Hz.
Amplitude
The amplitude of an analog signal is a function of time and may be represented in volts (unit of voltage).
In other words, the amplitude is its voltage value at any given time. At the time t1, the amplitude of the
signal is V1.
Phase
Two signals with the same frequency can differ in phase. This means that one of the signals starts at a
different time from the other one. This difference can be represented in degrees (0° to 360°) or by
radians. A phase angle of 0° indicates that the sine wave starts at time 0, and a phase angle of 90º
indicates that the signal starts at 90°.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 6
Digital Signals
Digital signals carry the data although it is a bit different. These signals are discrete or not
continuous.
A digital signal carries the data in the form of binary because it signifies in the bits. These signals
can be decomposed into sine waves which are termed as harmonics.
Every digital signal has amplitude, frequency, & phase like the analog signal.
This signal can be defined by bit interval as well as bit rate. Here, bit interval in nothing but the
required time for transmitting an only bit, whereas the bit rate is bit interval frequency.
Digital signals are more resistant toward the noise; therefore, it barely faces some distortion.
These waves are simple in transmitting as well as more dependable while contrasted to analog
waves.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 7
Analog vs Digital
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 8
Analog Signal Digital Signal
An analog signal signifies a continuous signal that A digital signal signifies a discrete signal that carries
keeps changes with a time period. binary data and has discrete values.
Analog signals are continuous sine waves. Digital signal is square waves.
Analog signals describe the behavior of the wave Digital signals describe the behavior of the signal
with respect to amplitude, time period, & phase of with respect to the rate of a bit as well as bit
the signal. interval.
Analog signal range will not be set. Digital signal is limited as well as ranges from 0 to 1.
Analog signal is further horizontal toward distortion A digital signal has resistance in response toward
during the response to noise. the noise, therefore, it does not often face
distortion.
An analog signal broadcasts the information in the A digital signal broadcasts the information in the
signal form. form of binary that is bits.
The example of an analog signal is the human voice. The example of a digital signal is the data
transmission in a computer.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 9
Digital benefits
Digital representation is more accurate.
Digital information are easier to store
Digital systems are easier to design.
Noise has less effect.
Digital systems can easily be fabricated in an integrated circuit.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 10
Digital Systems
A digital system is a data technology that uses discrete (discontinuous) values represented by
high and low states known as bits. By contrast, non-digital (or analog) systems use a continuous
range of values to represent information.
Although digital representations are discrete, the information represented can be either
discrete, such as numbers, letters or icons, or continuous, such as sounds, images, and other
measurements of continuous systems.
Digital systems are widely used and its applications can be seen in computers, calculators, and
cell phones.
In a digital system, information is transferred between components of the digital system in the
form of digital signals.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 11
Number System
The number system is a way to represent or express numbers.
Based on the different symbol used to represent numbers, there are various types of number
systems:
◦ The decimal number system
◦ The binary number system
◦ The octal number system and
◦ The hexadecimal number system
◦ Binary Coded Decimal or BCD Numbering System
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 12
Converting from Binary to Decimal
binary
1 1 1 0 0 1
number:
power of 2: 25 24 23 22 21 20
SOURCE: INTERNET 13
Converting from Decimal Integer to Binary
Conversion steps:
◦ Divide the number by 2.
◦ Get the integer quotient for the next iteration.
◦ Get the remainder for the binary digit.
◦ Repeat the steps until the quotient is equal to 0.
Example
Convert 1310 to binary : Division Remaind
Quotient Bit #
by 2 er
13/2 6 1 0
6/2 3 0 1
3/2 1 1 2
1/2 0 1 3
1310 = 11012
SOURCE: INTERNET 14
Converting Decimal Fraction to Binary
SOURCE: INTERNET 15
Converting from Octal to Binary
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to
7.
Octal numerals can be made from binary numerals by grouping consecutive binary digits into
groups of three (starting from the right).
SOURCE: INTERNET 16
Converting from Hex to Binary
Hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It
uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and
A, B, C, D, E, F (or alternatively a, b, c, d, e, f) to represent values ten to fifteen.
SOURCE: INTERNET 17
Binary Addition
Example:
SOURCE: INTERNET 18
Binary Coded Decimal (BCD)
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 19
SOURCE: HTTPS://REALPARS.COM/BCD/ 20
SOURCE: INTERNET 21
Logic Gates
Binary logic deals with binary variables and with operations that assume a logical meaning.
It is used to describe, in algebraic or tabular form, the manipulation and processing of binary
information.
The manipulation of binary information is done by logic circuits called gates .
Gates are blocks of hardware that produce signals of binary 1 or 0 when input logic
requirements are satisfied.
Each gate has a distinct graphic symbol and its operation can be described by means of an
algebraic expression.
The input-output relationship of the binary variables for each gate can be represented in tabular
form by a truth table.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 22
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 23
AND Gate
The AND gate produces the AND logic function: that is, the
output is 1 if input A and input B are both equal to 1; otherwise,
the output is 0.
These conditions are also specified in the truth table for the AND
gate. The table shows that output x is 1 only when both input A
and input Bare 1.
The algebraic operation symbol of the AND function is the same
as the multiplication symbol (.) of ordinary arithmetic.
AND gates may have more than two inputs, and by definition, the
output is 1 if and only if all inputs are 1.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 36
Logic Diagram
Boolean function can be transformed from an algebraic expression into a logic diagram
composed of AND, OR, and inverter/NOT gates.
The logic diagram consists of gates and symbols that can directly replace an expression in
Boolean arithmetic.
This is a graphical representation of a logic circuit that shows the wiring and connections of each
individual logic gate, represented by a specific graphical symbol that implements the logic
circuit.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 38