COA Unit1 Notes
COA Unit1 Notes
COA Unit1 Notes
What is Computer
What is Computer : Computer is an electronic device that is designed to work
with Information. The term computer is derived from the Latin term ‘computare’, this
means to calculate or programmable machine. Computer can not do anything
without a Program. It represents the decimal numbers through a string of binary
digits. The Word ‘Computer’ usually refers to the Center Processor Unit plus
Internal memory.
Charles Babbage is called the “Grand Father” of the computer. The First
mechanical computer designed by Charles Babbage was called Analytical
Engine. It uses read-only memory in the form of punch cards.
The computer is an electronic device that takes input from the user and processes
these data under the control of a set of instructions (called program) and gives the
result (output) and saves future use. It can process both numerical and non-numerical
(arithmetic and logical) calculations.
The basic components of a modern digital computer are: Input Device, Output
Device, Central Processor Unit (CPU), mass storage device and memory. A Typical
modern computer uses LSI Chips. Four Functions about computer are:
Input (Data):
Input is the raw information entered into a computer from the input devices. It is the
collection of letters, numbers, images etc.
Unit-1
Process:
Process is the operation of data as per given instruction. It is totally internal process
of the computer system.
Output:
Output is the processed data given by computer after data processing. Output is also
called as Result. We can save these results in the storage devices for the future use.
Computer Classification: By Size and Power
Computers differ based on their data processing abilities. They are classified
according to purpose, data handling and functionality.
According to functionality, computers are classified as:
Types->
Von-Neumann Architecture
Harvard Architecture
Instruction Set Architecture
Micro-architecture
System Design
Control Unit –
A control unit (CU) handles all processor control signals. It directs all
input and output flow, fetches code for instructions, and controls how
data moves around the system.
Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles all the
calculations the CPU may need, e.g. Addition, Subtraction, Comparisons.
It performs Logical Operations, Bit Shifting Operations, and Arithmetic
operations.
Logic Gates
o The logic gates are the main structural part of a digital system.
o Logic Gates are a block of hardware that produces signals of binary 1 or 0 when input logic
requirements are satisfied.
o Each gate has a distinct graphic symbol, and its operation can be described by means of
algebraic expressions.
o The seven basic logic gates includes: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
o The relationship between the input-output binary variables for each gate can be
represented in tabular form by a truth table.
o Each gate has one or two binary input variables designated by A and B and one binary
output variable designated by x.
AND GATE:
The AND gate is an electronic circuit which gives a high output only if all its inputs are high. The AND
operation is represented by a dot (.) sign.
OR GATE:
Unit-1
The OR gate is an electronic circuit which gives a high output if one or more of its inputs are high.
The operation performed by an OR gate is represented by a plus (+) sign.
NOT GATE:
The NOT gate is an electronic circuit which produces an inverted version of the input at its output. It
is also known as an Inverter.
NAND GATE:
The NOT-AND (NAND) gate which is equal to an AND gate followed by a NOT gate. The NAND gate
gives a high output if any of the inputs are low. The NAND gate is represented by a AND gate with a
small circle on the output. The small circle represents inversion.
NOR GATE:
The NOT-OR (NOR) gate which is equal to an OR gate followed by a NOT gate. The NOR gate gives a
low output if any of the inputs are high. The NOR gate is represented by an OR gate with a small
circle on the output. The small circle represents inversion.
Unit-1
EXCLUSIVE-NOR/Equivalence GATE:
The 'Exclusive-NOR' gate is a circuit that does the inverse operation to the XOR gate. It will give a low
output if one of its inputs is high but not both of them. The small circle represents inversion.
Unit-1
A two-input NAND gate is a digital combination logic circuit that performs the logical
inverse of an AND gate. While an AND gate outputs a logical "1" only if both inputs
are logical "1," a NAND gate outputs a logical "0" for this same combination of
inputs.
NAND Gate
NOR Gate
Realization of the Logic Gate: Using NAND Gate and NOR Gate
For the NOT gate realization, we require 1 NAND gate, as shown in the circuit
diagram:
For the NOT gate realization, we require 1 NOR gate, as shown in the circuit diagram:
For the AND gate realization, we require 2 NAND gates, as shown in the circuit
diagram:
Unit-1
For the AND gate realization, we require 3 NOR gates if the inputs are not available in
complement form, as shown in the circuit diagram:
OR Gate Realization
For the OR gate realization, we require 3 NAND gates if the inputs are not available in
complement form, as shown in the circuit diagram:
For the OR gate realization, we require 2 NOR gates, as shown in the circuit diagram:
Unit-1
Boolean algebra->
Boolean algebra can be considered as an algebra that deals with binary variables and
logic operations. Boolean algebraic variables are designated by letters such as A, B, x,
and y. The basic operations performed are AND, OR, and complement.
The Boolean algebraic functions are mostly expressed with binary variables, logic
operation symbols, parentheses, and equal sign. For a given value of variables, the
Boolean function can be either 1 or 0. For instance, consider the Boolean function:
F = x + y'z
The logic diagram for the Boolean function F = x + y'z can be represented as:
o 1. F1 = xyz'
o 2. F2 = x + y'z
o 3. F3 = xy' + x'z
Boolean Addition
The addition operation of Boolean algebra is similar to the OR operation. In digital circuits, the
OR operation is used to calculate the sum term, without using AND operation. A + B, A + B', A + B
+ C', and A' + B + + D' are some of the examples of 'sum term'. The value of the sum term is true
when one or more than one literals are true and false when all the literals are false.
Boolean Multiplication
The multiplication operation of Boolean algebra is similar to the AND operation. In digital
circuits, the AND operation calculates the product, without using OR operation. AB, AB, ABC, and
ABCD are some of the examples of the product term. The value of the product term is true when
all the literals are true and false when any one of the literal is false.
Commutative Law
This law states that no matter in which order we use the variables. It means that the order of
variables doesn't matter. In Boolean algebra, the OR and the addition operations are similar. In
the below diagram, the OR gate display that the order of the input variables does not matter at
all.
A+B = B+A
A.B = B.A
Unit-1
Associative Law
This law states that the operation can be performed in any order when the variables priority is
same. As '*' and '/' have same priority. In the below diagram, the associative law is applied to
the 2-input OR gate.
A + (B + C) = (A + B) + C
A(BC) = (AB)C
According to this law, no matter in what order the variables are grouped when ANDing more
than two variables. In the below diagram, the associative law is applied to 2-input AND gate.
Distributive Law:
According to this law, if we perform the OR operation of two or more variables and then
perform the AND operation of the result with a single variable, then the result will be similar to
Unit-1
performing the AND operation of that single variable with each two or more variable and then
perform the OR operation of that product. This law explains the process of factoring.
A(B + C) = AB + AC
There are the following rules of Boolean algebra, which are mostly used in manipulating and
simplifying Boolean expressions. These rules plays an important role in simplifying boolean
expressions.
1. A+0=A 7. A.A=A
2. A+1=1 8. A.A'=0
3. A.0=0 9. A''=A
Rule 1: A + 0 = A
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform OR
operation with 0, the result will be the same as the input variable. So, if the variable value is 1,
then the result will be 1, and if the variable value is 0, then the result will be 0. Diagrammatically,
this rule can be defined as:
Unit-1
Rule 2: (A + 1) = 1
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform OR
operation with 1, the result will always be 1. So, if the variable value is either 1 or 0, then the
result will always be 1. Diagrammatically, this rule can be defined as:
Rule 3: (A.0) = 0
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
AND operation with 0, the result will always be 0. This rule states that an input variable ANDed
with 0 is equal to 0 always. Diagrammatically, this rule can be defined as:
Rule 4: (A.1) = A
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
AND operation with 1, the result will always be equal to the input variable. This rule states that
an input variable ANDed with 1 is equal to the input variable always. Diagrammatically, this rule
can be defined as:
Unit-1
Rule 5: (A + A) = A
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
OR operation with the same variable, the result will always be equal to the input variable. This
rule states an input variable ORed with itself is equal to the input variable always.
Diagrammatically, this rule can be defined as:
Rule 6: (A + A') = 1
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
OR operation with the complement of that variable, the result will always be equal to 1. This rule
states that a variable ORed with its complement is equal to 1 always. Diagrammatically, this rule
can be defined as:
Rule 7: (A.A) = A
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
AND operation with the same variable, the result will always be equal to that variable only. This
rule states that a variable ANDed with itself is equal to the input variable always.
Diagrammatically, this rule can be defined as:
Unit-1
Rule 8: (A.A') = 0
Let's suppose; we have an input variable A whose value is either 0 or 1. When we perform the
AND operation with the complement of that variable, the result will always be equal to 0. This
rule states that a variable ANDed with its complement is equal to 0 always. Diagrammatically,
this rule can be defined as:
Rule 9: A = (A')'
This rule states that if we perform the double complement of the variable, the result will be the
same as the original variable. So, when we perform the complement of variable A, then the
result will be A'. Further if we again perform the complement of A', we will get A, that is the
original variable.
We can prove this rule by using the rule 2, rule 4, and the distributive law as:
Rule 11: A + AB = A + B
Combinational Circuits
Combinational circuit is a circuit in which we combine the different gates in the circuit.
A logic gate is a basic building block of any electronic circuit. The output of the combinational circuit
depends on the values at the input at any given time. The circuits do not make use of any memory or
storage device.
Combinational logic is used in computer circuits to perform Boolean algebra on input signals and on
stored data.Other circuits used in computers, such as half adders, full adders, half subtractors, full
subtractors, multiplexers, demultiplexers, encoders and decoders are also made by using
combinational logic.
● The output of a combina onal circuit at any instant of me, depends only on
● It does not use any memory. The previous state of input does not have any
Adder
What is an Adder?
An adder is a circuit that can be integrated with many other circuits for a wide range
of applications. It is a kind of calculator used to add two binary numbers. There are
With the help of half adder, we can design circuits that are capable of performing
0+0 = 0
0+1 = 1
1+0 = 1
1+1 = 10
These are the possible single-bit combinations. But the result for 1+1 is 10. Though
this problem can be solved with the help of an EXOR Gate, the sum result must be
0+0 = 00
0+1 = 01
1+0 = 01
1+1 = 10
Here the output ‘1’of ‘10’ becomes the carry-out. The result is shown in a truthtable below. ‘SUM’ is
the normal output and ‘CARRY’ is the carry-out.
Unit-1
INPUTS OUTPUTS
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
From the equation, it is clear that this 1-bit adder can be easily implemented with
the help of EXOR Gate for the output ‘SUM’ and an AND Gate for the carry. Take
Mux, De-Mux
Multiplexer is a combinational circuit that has a maximum of 2n data inputs, ‘n’ selection lines and
single output line. One of these data inputs will be connected to the output based on the values of
selection lines.
Since there are ‘n’ selection lines, there will be 2n possible combinations of zeros and ones. So, each
combination will select only one data input. Multiplexer is also called as Mux
2x1 Multiplexer
2x1 Multiplexer has two data inputs I1 & I0, one selection line S and one output Y.
i0 0 i0
i1 1 i1
Y= S’I0 + SI1
4x1 Multiplexer
4x1 Multiplexer has four data inputs I3, I2, I1 & I0, two selection lines s1 & s0 and
one output Y. The block diagram of 4x1 Multiplexer is shown in the following
figure.
Unit-1
De-Multiplexer
De-Multiplexer De-Multiplexer or demux is a combinational circuit that performs the reverse
operation of a Multiplexer. It has single input,and selects one of many data output lines,which is
connected to the single input. It has ‘n’ selection lines and maximum of 2n outputs. Since there are
Unit-1
‘n’ selection lines, there will be 2n possible combinations of zeros and ones. So, each combination
can select only one output.
the process of getting information from one input and transmitting the same over one of many
outputs is called demultiplexing. There are several types of demultiplexers based on the output
configurations such as 1:2, 1:4, 1:8 and 1:16
Demultiplexer
It has one input line and two output lines, one select line.
Therefore 21 = 2)
In the figure, there are only two possible ways to connect the input to output lines, thus only one
select signal is enough to do the demultiplexing operation. When the select input is low, then the
input will be passed to Y0 and if the select input is high then the input will be passed to Y1.
Unit-1
1:4 De-Multiplexer :
1:4 De-Multiplexer has one input D, two selection lines, s1 & s0 and four outputs
Y3, Y2, Y1 &Y0. The block diagram of 1:4 De-Multiplexer is shown in the following
Figure
Unit-1