Computer Organization Material
Computer Organization Material
Logic gates are the basic building blocks of any digital system. It is an electronic circuit having
one or more than one input and only one output. The relationship between the input and the
output is based on certain logic. Based on this, logic gates are named as AND gate, OR gate,
NOT gate etc.
(1) Buffer: A triangle symbol by itself designates a buffer circuit. A buffer does not produce
any particular logic function since the binary value of the output is the same as the binary
value of the input.
INPUT OUTPUT
Symbol:
A Q
0 0
1 1
Boolean algebra: A
(2) AND Gate: An AND gate requires two or more inputs and produce only one output. The AND
gate produces an output of logic 1 state when each of the inputs are at logic 1 state and also
produces an output of logic 0 state even if any of its inputs are at logic 0 state. The symbol for
AND operation is ‘.’, or we use no symbol for representing. If the inputs are of X and Y, then the
output can be expressed as Q=A*B.
Symbol:
INPUT OUTPUT
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
(3) OR Gate: Similar to AND gate, an OR gate may also have two or more inputs but produce only
one output. The OR gate produces an output of logic 1 state even if any of its inputs is in logic 1
state and also produces an output of logic 0 state if any of its inputs is in logic 0 state. The
1|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
symbol for OR operation is ‘+’. If the inputs are of X and Y, then the output can be represented
as Q=A+B.
INPUT OUTPUT
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
(4)NAND Gate: The output of the NAND gate is at logic 0 level only when each of the inputs assumes a
logic 1 level. NAND means NOT AND. That means, NAND gate is a combination of an AN gate and a NOT
gate
INPUT OUTPUT
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
(4) NOR gate: NOR means NOT OR. That means, NOR gate is a combination of an OR gate and a
NOT gate.
INPUT OUTPUT
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
2|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
(5) XOR gate: The output of a two input exclusive-OR is true only when the two input values
are different, and false if they are equal.
INPUT OUTPUT
A B Q
0 0 0
0 1 1
1 0 1
1 1 0
INPUT OUTPUT
A B AND NAND OR NOR XOR XNOR
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1
3|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
Lecture-2
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 The Boolean function F = x + y'z is transformed from an algebraic expression into a logic
diagram composed of AND, OR, and inverter gates.
o Inverter at input 'y' generates its complement y'.
o There is an AND gate for the term y'z, and an OR gate is used to combine the two terms
(x and y'z).
o The variables of the function are taken to be the inputs of the circuit, and the variable
symbol of the function is taken as the output of the circuit
The truth table for the Boolean function F = x + y'z can be represented as:
4|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
Task-2
Question: Find the Boolean algebra expression and truth table
for the following system.
5|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
6|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
The basic components of a combinational circuit are: input variables, logic gates, and
output variables.
The 'n' input variables come from an external source whereas the 'm' output variables go
to an external destination. In many applications, the source or destination are storage
registers.
Half - Adder
A Half-adder circuit needs two binary inputs and two binary outputs. The input variable
shows the augend and addend bits whereas the output variable produces the sum and
carry. We can understand the function of a half-adder by formulating a truth table. The
truth table for a half-adder is
S = x'y+xy', C = xy
The logic diagram for a half-adder circuit can be represented as:
7|P a ge
By: Assistant Professor Devangi Parekh
C.U.Shah Institute of computer Application, Ahmadabad.
Full - Adder
This circuit needs three binary inputs and two binary outputs. The truth table for a full-
adder is:
o Two of the input variable 'x' and 'y', represent the two significant bits to be added.
o The third input variable 'z', represents the carry from the previous lower significant
position.
o The outputs are designated by the symbol 'S' for sum and 'C' for carry.
o The eight rows under the input variables designate all possible combinations of 0's, and
1's that these variables may have.
o The input-output logical relationship of the full-adder circuit may be expressed in two
Boolean functions, one for each output variable
8|P a ge
By: Assistant Professor Devangi Parekh