Computer
Systems
Chapter # 1
sd
I C T D E PA R T M E N T
AKHSS,KARACHI
(EVENING SHIFT)
Computer System
Computer System
Combination of Hardware and Software is called Computer.
Where:
Hardware are Physical/Tangible components.
Software are Logical/Non-Tangible components.
Data Representation in Digital Computers
SLO: 1.1
Analog Signals (Characteristics & Examples)
• Human Speech.
• Video Signals/ TV Signals.
• Temperature Reading.
Digital Signals (Characteristics & Examples)
• Communication through Internet.
• Digital images such as JPEG,
• Digital Videos like MP4.
• Digital audio like MP.3.
Difference Between Analog and Digital Signals
SLO: 1.1.1
Digital Signals Analog Signals
1. Values
Specific limited discrete values of 0s and 1s It can have value any within a range
2. Representation
It is represented in discrete values of 0s and 1s It is represented in a continuous waveform
3. Transmission
Transmitted over long distances with less degradation Degrade on long distances
4. Scalability
Easily scalable Not easily scalable
5. Processing Complexity
Its typically simpler Its often more complex
6. Noise Susceptibility
Less affected by Noise and Interference affected by Noise and Interference
7. Storage
More efficient for storing & processing for large data Less efficient for storing & processing for large data
8. Example
MP3 & MP4 Files, JPEG images, Digital TV Signals Sound Waves, Traditional TV, Broadcasts, Temperature Reading.
Explain the Binary Data Representation Using Binary
Pulses, i.e., 0/ LOW/ OFF and 1/ High/ ON
SLO : 1.1.2
Binary Pulses
• “0” and “1” are called “Binary Pulses” or “Logic Levels”.
• “0” called Low Level Binary Pulse which may have voltage value from 0V to +0.8V.
• “1” called High Level Binay Pulse which may have voltage value from +2V to +5V.
• The circuit that operate on these signals are called Digital Logic Circuits.
Digital Operation Of Computer
• Computer is a Digital Machine.
• It converts input into Binary Codes (0s and 1s) before processing.
• Main memory (RAM) stores data in binary form.
• Computer Processor processes data in the Binary/Digital form.
• After processing results again convert into human-readable form (Decimal).
• Data is represented in Computer using two electronic switches ONs and OFFs.
• “1” represents “ON”/”HIGH” and “0” represents “OFF”./”LOW”
• Combination of “0” and “1” shows different characters of our data which we input to
computer.
• Character set of “0s” and “1s” is called “Coding Scheme”.
• “ASCII Codes” is an example of Coding scheme, it represents each character of our keyboard
by single combination of 0s and 1s.
Logic Gates
SLO: 1.2
Background Concepts
Multiplication of Binary Numbers
Define the following terms:
a. Digital logic.
b. Logic gates & Logic circuits.
c. Truth table.
SLO: 1.2.1
a. Digital logic.
• A system that uses two states, often
represented as 0 and 1, to represent and
process information.
• It is the foundation of digital computing.
• It involves representing and manipulating
information within electronic circuits using
two discrete states 0 and 1.
• It's the system of rules that allow us to
make extremely complicated decisions
based on relatively simple "yes/no"
questions.
b. Logic gates & Logic circuits.
• Logic gates are fundamental building blocks of digital circuits, and
logic circuits are composed of interconnected logic gates.
• They are essential for processing information in digital devices,
acting as switches that control the flow of electrical signals based
on logic rules.
• A logic gate, or simply gate, is a special form of amplifier circuit
designed to input and output logic level voltages (voltages intended
to represent binary bits).
• Three basic logic gates include OR,AND & NOT gates. Each gate
perform a different operation on its inputs to produce the desired
outputs.
c. Truth table.
• A diagram in rows and columns showing
how the truth or falsity of
a proposition varies with that of its
components.
• A table or chart used to illustrate and
determine the truth value of
propositions and the validity of their
resulting argument.
• It shows a relationship between inputs
and outputs of a digital logic circuit or
Boolean function.
Creation of TRUTH TABLE
• We need TWO important things to draw Truth Table:
N = No. of possible input combinations for Truth Table.
n = Number of Input Variables.
• We need to use this formula. N = 2n.
• Example:
For TWO inputs: N = 22 = 4 Combinations.
For THREE inputs: N = 23 = 8 Combinations.
For FOUR inputs: N = 24 = 16 Combinations.
Few Examples of Truth Tables
(With Different No. of Inputs)
Explain the following Logic Gates in terms of the
number of Inputs and Outputs using Truth
tables:
a. AND.
b. OR.
c. NOT.
d. NAND.
e. NOR.
f. Exclusive OR (XOR).
g. Exclusive NOR (XNOR).
SLO: 1.2.2 / 1.2.3
a) AND Logic Gate:
b) OR Gate:
c) NOT Gate:
d) NAND Gate:
X=A.B
e) NOR Gate:
X=A+B
f) Exclusive OR / XOR Gate:
X = AB + AB / X = A B
g)Exclusive NOR / XNOR Gate:
X = A B + AB / X = A B
g)Exclusive NOR / XNOR Gate:
Explain the Uses of Logic Gates in Digital Devices
SLO: 1.2.4
1. Memory Circuits:
◦ Logic gates are used to build Flip-Flops and Latches.
◦ Flip-Flops is digital circuit that can store Binary Digits.
◦ Where Flip-Flops are used to create Registers and Counter Sequential Circuits.
◦ Latches are also use to store Binary Digits.
◦ Where Latches are used to create Memory Storage Elements and Data Path Circuits.
2. ALU:
◦ ALU (Arithmetic & Logic Unit) is one of the basic part of CPU and used to perform
fundamental operations of CPU related to Arithmetic Functions where Logic Gates are
used to perform basic actions like Addition, Subtraction, Multiplication and Division.
3. Clock Synchronization:
◦ Logic Gates in Clock Synchronization ensure all parts of a digital system work together
at the same time.
◦ It used to control timing signals to coordinate the actions of different parts of system
to avoid timing errors.
4. DSP:
◦ DSP (Digital Signals Processing) means to perform three actions Filtering, Modulation
and Demodulation.
◦ Where Filtering means to remove Noise from signals.
◦ Where Modulation means to convert signals into suitable format which suitable for
transmission.
◦ Where Demodulation means to convert the signal back into its original form.
5. Home Automation:
◦ Logic Gates are used in home automation systems to process inputs from sensors. It
makes homes efficient for example ON/OFF Lights, adjusting temperature and
LOCK/UNLOCK doors/windows.
6. Medical Devices:
◦ Logic Gates are used in medical devices such as ECG (ElectoCardioGram) machines,
MRI (Magnetic Resonance Imaging) scanners and patient monitoring systems.
7. Data Encryption & Decryption:
◦ Logic Gates are used in Cryptographic Algorithms to perform Encryption and
Decryption.
◦ Where Encryption means to convert data into coded form before transmission.
◦ Where Decryption means to convert data into its real form.
8. Traffic Light Control:
◦ Logic Gates are used in the traffic signals to ON/OFF lights to control traffic and
prevent accidents.
9. Robotics:
◦ Logic Gates are used in robots with the help of sensors to perform different actions
such as moving, stopping or picking up objects.
◦ All basic circuits of robots based on Logic Gates.
10. Security Systems:
◦ Logic Gates are used to manage security cameras.
◦ These are also used in security system like burglar alarm to avoid unauthorized
entries.
11. Automative Electronics :
◦ Logic Gates are used in automobile automative electronics for making quick decisions to
control the engine.
◦ To open airbags and manage braking system.
◦ They also manage ABS (Anti-lock brake System) to prevent wheel lockup braking.
12. Aerospace Applications :
◦ Logic Gates are used in different digital circuits of aircraft or spacecraft like in GPS to
determine the location.
◦ They can also used in autopilot mode by controlling direction, altitude and speed
according to given instruction.
Explain the following Boolean identities
(a. Identity law. b. Distributive law. c. Associative law. d.
Commutative law. e. Inverse (Complement) law. f. De-
Morgan’s Theorem. g. Absorption law.)
SLO: 1.2.6
Boolean Algebra
• It was introduced by a British Mathematician “George Boole” in his book named
“The Laws Of Thoughts”.
It is algebra of logic, it uses binary values (0,1), so it is also known as “Binary
Algebra” or “Logical Algebra”.
Boolean Identities
“These are the basic rules and properties used to simplify and
manipulate the expression of Boolean Algebra”
Construct a Logic Circuit for a given Real-Life
problem
OR
Boolean Function and its Conversion to Logic Circuit
SLO: 1.2.7
Example 1 (F1 = x y 𝑧 )
Example 2 (F2 = x + y z )
Example 3 (x y + x z )
Example 4 ( x y z + x y z + x y )
Karnaugh Map ( K-Map )
SLO: 1.3
K-Map
It was introduced by MAURICE KARNAUGH in 1953.
It is a Graphical Method used to simplify Boolean Expressions.
Its Pictorial Form of Truth Table.
It consists upon square boxes called cells.
The number of cells in K-Maps is equal to the total number of possible input
variables combinations.
For Example:
For 2-Variables 22 = 4 Cells.
For 3-Variables 23 = 8 Cells
For 4-Variables 24 = 16 Cells
AND Gate Truth Table
Explanation
X Y R
0 0 0
0 1 0
1 0 0
Pictorial Form of Truth Table 1 1 1
Consider AND Gate a Boolean AND Gate K-Map
Function (R = X * Y) Y Y
X XY XY
K-Maps
X XY XY
Characteristics of K-Maps
Y Y
1) Inputs: (X , Y)
X XY XY 2) In TWO States:
XY
X X
X XY
Y Y
3) Cells
4). All possible combinations of
variables involved
Use Of K-Maps
Simplification of Boolean Functions.
To reduce No. of Logic gates.
Example:
In Maths: “3 + (2 * 4) + 9”
If we simplify than we replace it with “20”
Now In Boolean Function:
Let Say: R = AB + AB + AB
After Applying K-Map
R=A+B
After Simplification of K-Map:
R = AB + AB + AB R=A+B
1 OR Gate
1 NOT Gate
3 AND Gates
1 NOT Gate
1 OR Gate
Total 6 Gates
Rules For Making K-Maps
1) Make Cells.
2) Write Inputs.
3) Fill Cells.
Consider the same example:
R = A B + A B + AB
1) Make Cells
Find out No. of Inputs.
B B
Because:
Cells = 2n
A AB AB
Where n=No. of Inputs
So, According to above example. Cells = 22 = 4 A AB AB
2) Write Inputs
Inputs will appear in both of its forms (simple
and in Complement forms).
3) Fill Cells
Multiply all values of ROWS and Columns in
respective cells.
Simplify Two-Variables and Three Variables Boolean Functions
Using K-Maps
SLO: 1.3.1
Steps
Step 1: Write 1 against terms of Boolean Function.
Step 2: Make group of cells containing 1 .
Vertical OR Horizontal.
No Diagonal.
Step 3: Eliminate Terms/variables from Groups
That is in Normal and Complemented Forms
Step 4: Create a Term for each Group.
Step 5: Sum of terms
Simplify Two-Variables Boolean Functions Using K-Maps
Let Suppose: R = A B + A B + AB
B B
Step 1: Write 1 against terms of Boolean Function.
Step 2: Make group of cells containing 1 .
A AB A1B
Vertical OR Horizontal.
No Diagonal.
A A1B A1B
Step 3: Eliminate Terms/variables from Groups
That is in Normal and Complemented Forms
Step 4: Create a Term for each Group.
AB AB AB A B
Step 5: Sum of terms
A+B
R = A B + A B + AB = A + B
Making of Three Variables K-Map
Consider the same example: B B B B
R=ABC+ ABC+ABC+ABC
1) Make Cells A ABC ABC ABC ABC
Find out No. of Inputs.
Because:
Cells = 2n A ABC ABC ABC ABC
Where n=No. of Inputs
So, According to above example. Cells = 23 = 8
2) Write Inputs C C C C
Inputs will appear in both of its forms (simple
and in Complement forms).
3) Fill Cells
Multiply all values of ROWS and Columns in
respective cells.
Simplify Three-Variables Boolean Functions Using K-Maps
Let Suppose: R = A B C + A B C + A B C + A B C
B B B B
Step 1: Write 1 against terms of Boolean Function.
Step 2: Make group of cells containing 1 . A ABC ABC ABC 1
1 ABC
Vertical OR Horizontal.
No Diagonal.
Step 3: Eliminate Terms/variables from Groups
1 ABC
A ABC 1 ABC ABC
That is in Normal and Complemented Forms
Step 4: Create a Term for each Group. C C C C
Step 5: Sum of terms
ABC ABC ABC ABC
R=ABC+ ABC+ABC+ABC = AB+AB
AB + AB
Convert the given algebraic expression into its Sum of
Products (SOP) and Product of Sums (POS) forms;
SLO: 1.3.2
Sum Of Product (SOP)
There will be Multiplication Process First then Addition.
It in Logic Gate figure AND will come first then OR Gate.
Example:
F=(AB) + (AB)
Product Of Sum (POS)
There will be Addition Process First then Multiplication.
It in Logic Gate figure OR will come first then AND Gate.
Example:
F=(A+ B) . (A+B)
Conversion to POS
F=(AB) + (AB)
FSOP = FPOS
F=(AB) + (AB)
F = (A B) + (A B)
F = (A + B) . (A + B)