Docsity

coa lab manual all important experiments notes, Study Guides, Projects, Research of Computer Architecture and Organization

Toggle sidebar
bg1
Experiment 1
AIM: Implementing HALF ADDER, FULL ADDER using basic logic gates
Theory: The most basic arithmetic operation is the addition of two binary digits.
There are four possible elementary operations, namely,
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 (with 1 as carry)
The first three operations produce a sum of whose length is one digit, but when the
last operation is performed the sum is two digits. The higher significant bit of this
result is called a carry and lower significant bit is called the sum.
Half Adder: A combinational circuit which performs the addition of two bits is called
half adder. The input variables designate the augend and the addend bit, whereas the
output variables produce the sum and carry bits.
Block Diagram:
X HS
Y CO
Truth Table:
S.No Input Output
X Y HS CO
10000
20110
31010
41101
HA
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f

Partial preview of the text

Download coa lab manual all important experiments notes and more Study Guides, Projects, Research Computer Architecture and Organization in PDF only on Docsity!

Experiment 1 AIM: Implementing HALF ADDER, FULL ADDER using basic logic gates Theory: The most basic arithmetic operation is the addition of two binary digits. There are four possible elementary operations, namely, 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 (with 1 as carry) The first three operations produce a sum of whose length is one digit, but when the last operation is performed the sum is two digits. The higher significant bit of this result is called a carry and lower significant bit is called the sum. Half Adder : A combinational circuit which performs the addition of two bits is called half adder. The input variables designate the augend and the addend bit, whereas the output variables produce the sum and carry bits. Block Diagram: X HS Y CO Truth Table: S.No Input Output X Y HS CO 1 0 0 0 0 2 0 1 1 0 3 1 0 1 0 4 1 1 0 1

HA

Logic Diagram: X Y HS CO Full Adder : A combinational circuit which performs the arithmetic sum of three input bits is called full adder. The three input bits include two significant bits and a previous carry bit. A full adder circuit can be implemented with two half adders and one OR gate. Block Diagram: A B Cin

S

Cout Truth Table: Inputs Outputs X Y Cin S Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

  1. Full Adder Simulation :- Make full adder using logic gates in simulator editor window as shown below in screenshot and verify truth table of full adder by simulating diagram. Result:- Implementation of HALF ADDER & FULL ADDER using basic logic gates has been done in simulator. Questions: Q.1 What is a half Adder? Q.2 What is a Full Adder Q.3 Make full adder with two Half Adder.

EXPERIMENT NO. – 2

EXPERIMENT NAME: Implementing Binary -to -Gray, Gray -to -Binary code conversions. PROBLEM STATEMENT: In this we have to convert binary number into gray code and vice versa. OBJECTIVE:. : Implementing Binary -to -Gray, Gray -to -Binary code conversions. Using COA Simulator SOFTWARE REQUIRED: Sr. no. Name of equipment’s/components/software Specification/range/rating/version Quantity 1 COA SIMULATOR BY IIT KHARAGPUR Definition of Binary and Gray code: Gray code – also known as Cyclic Code , Reflected Binary Code (RBC), Reflected Binary (RB) or Grey code – is defined as an ordering of the binary number system such that each incremental value can only differ by one bit. In gray code, while traversing from one step to another step only one bit in the code group changes. That is to say that two adjacent code numbers differ from each other by only one bit. Gray code is the most popular of the unit distance codes, but it is not suitable for arithmetic operations. Gray code has some applications in analog to digital converters, as well as being used for error correction in digital communication. Gray code can be

How to Convert Binary to Gray Code

  1. The MSB (Most Significant Bit) of the gray code will be exactly equal to the first bit of the given binary number.
  2. The second bit of the code will be exclusive-or (XOR) of the first and second bit of the given binary number, i.e if both the bits are same the result will be 0 and if they are different the result will be 1.
  3. The third bit of gray code will be equal to the exclusive-or (XOR) of the second and third bit of the given binary number. Thus the binary to gray code conversion goes on. An example is given below to illustrate these steps. Binary to Gray Code Conversion Example
  4. The MSB is kept the same. As the MSB of the binary is 0, the MSB of the gray code will be 0 as well (first gray bit)
  5. Next, take the XOR of the first and the second binary bit. The first bit is 0, and the second bit is 1. The bits are different so the resultant gray bit will be 1 (second gray bit)
  6. Next, take the XOR of the second and third binary bit. The second bit is 1, and the third bit is 0. These bits are again different so the resultant gray bit will be 1 (third gray bit)
  1. Next, take the XOR of third and fourth binary bit. The third bit is 0, and the fourth bit is 0. As these are the same, the resultant gray bit will be 0 (fourth gray bit)
  2. Lastly, take the XOR of the fourth and fifth binary bit. The fourth bit is 0, and the fifth bit is 1. These bits are different so the resultant gray bit will be 1 (fifth gray bit)
  3. Hence the result of binary to gray code conversion of 01001 is complete, and the equivalent gray code is 01101. Gray to Binary Code Converter In a gray to binary code converter , the input is gray code and output is its equivalent binary code. Gray to binary Code Conversion Table Decimal Number Gray code Binary code 0 0000 0000 1 0001 0001 2 0011 0010 3 0010 0011 4 0110 0100 5 0111 0101 6 0101 0110 7 0100 0111 8 1100 1000 9 1101 1001 10 1111 1010 11 1110 1011

Some other applications of gray code:  Boolean circuit minimization  Communication between clock domains  Error correction  Genetic algorithms  Mathematical puzzles  Position encoders Advantages of Gray Code  Better for error minimization in converting analog signals to digital signals  Reduces the occurrence of “Hamming Walls” (an undesirable state) when used in genetic algorithms  Can be used to in to minimize a logic circuit  Useful in clock domain crossing Disadvantages of Gray Code  Not suitable for arithmetic operations  Limited practical use outside of a few specific applications Questions for Practice: Design binary to gray code converter using Universal Gate Nand.

  1. Design Binary to gray code converter using Universal Gate Nor.
  2. Design gray to binary code converter using Universal Gates Nand and Nor. Questions: Q.1 What is a code converter? Q.2 Differentiate between translator and code converter. Q.3 Explain the primary usage of grey code. Q.4 Illustrate the reasons for using grey code.

Experiment 3 AIM:- Implementing 3-8 line Decoder. Theory: - Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2 n output lines. One of these outputs will be active High based on the combination of inputs present, when the decoder is enabled. That means decoder detects a

Y 2 =EA 1 .A’ 0

Y 3 =EA 1 .A 0

Each output is having one product term. So, there are four product terms in total. We can implement these four product terms by using four AND gates having three inputs each & two inverters. The circuit diagram of 2 to 4 decoder is shown in the following figure. By neglecting Enable bit we can design 2-4 Decoder as shown below-

Therefore, the outputs of 2 to 4 decoder are nothing but the min terms of two input variables A 1 & A 0 , when enable, E is equal to one. If enable, E is zero, then all the outputs of decoder will be equal to zero. Similarly, 3 to 8 decoder produces eight min terms of three input variables A 2 , A 1 & A 0 and 4 to 16 decoder produces sixteen min terms of four input variables A 3 , A 2 , A 1 & A 0. 3 to 8 Decoder Similarly 3 to 8 Decoder has three inputs A 2 , A 1 & A 0 and eight outputs, Y 7 to Y 0. We can find the number of lower order decoders required for implementing higher order decoder using the following formula. The Truth table of 3 to 8 decoder is shown below.

By ignoring Enable bit we can design 3-8 line Decoder as shown in Diagram below- Simulation:- 2-4 Decoder & 3-8 Decoders are simulated in simulator, screenshots are given below as- EXPERIMENT NO. 4 EXPERIMENT NAME: Implementing 41 and 81 Multiplexers**

PROBLEM STATEMENT: Design 41 and 81 Multiplexers using COA simulator. OBJECTIVE:** To implement the working of 41 and 81 Multiplexer. APPARATUS REQUIRED: Sr. no. Name of Equipments/components/software Specification/range/rating/ version Quantity 1 COA Simulator by IIT Kharagpur Multiplexers: A Multiplexer (MUX) can be described as a combinational circuit that receives binary information from one of the 2^n input data lines and directs it to a single output line. The selection of a particular input data line for the output is decided on the basis of selection lines. The multiplexer is often called as data selector since it selects only one of many data inputs. Note: A 2^n-to-1 multiplexer has 2^n input data lines and n input selection lines whose bit combinations determine which input data are selected for the output. Block diagram of 4*1 Multiplexer

Digital Circuit Diagram of 41 Multiplexer. We can also implement higher order multiplexers using lower order multiplexers. For instance, let us implement an 8 1 multiplexer using two 41 multiplexers and a 2 multiplexer. The two 41 multiplexers are required in the first stage to get the eight input data lines. A 21 multiplexer is required in the second stage to converge the outputs generated at first stage into a single output. The following image shows the block diagram of an 81 multiplexer designed using two 41 multiplexers and a single 2*1 multiplexer.

S1 S0 y 0 0 0 10 0 0 1 I 0 1 0 I 0 1 1 I 1 0 0 I 1 0 1 I 1 1 0 I 1 1 1 17 Function Table of 8*1 Multiplexer. Questions for Practice: