×
WORK HARD IN SILENCE; LET SUCCESS MAKE THE NOISE

# Lab Manuals for Computer Organisation and Architecture - COA By Virat Kumar

• Computer Organisation and Architecture - COA
• Practical
• 535 Views
Virat Kumar
0 User(s)

#### Text from page-2

int output; if(a==0 && b==0) output=0; if(a==1 && b==0) output=1; if(a==0 && b==1) output=1; if(a==1 && b==1) output=1; return (output); } int Not(int a) { int output; if(a==0 ) output=1; if(a==1 ) output=0; return (output); } Logic gates Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with the aid of truth tables. AND gate

#### Text from page-3

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted i.e. AB OR gate The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high. A plus (+) is used to show the OR operation. NOT gate The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams below show two ways that the NAND logic gate can be configured to produce a NOT gate. It can also be done using NOR logic gates in the same way.

#### Text from page-4

2. Write a program in C-language to implement division algorithm. #include <stdio.h> int main(){ int dividend, divisor, quotient, remainder; printf("Enter dividend: "); scanf("%d", &dividend); printf("Enter divisor: "); scanf("%d", &divisor); // Computes quotient quotient = dividend / divisor; // Computes remainder remainder = dividend % divisor; printf("Quotient = %d\n", quotient); printf("Remainder = %d", remainder); return 0; }

#### Text from page-5

3. Give the presentation on 74xx series IC for gates. PROCEDURE: Part 1 Examine the breadboard. The breadboard can be set up with both switches (for inputs) and Light Emitting Diodes, LEDs (for outputs). This board is used when for testing circuit designs. The circuit designs and programs should be created prior to coming to lab. Investigate the breadboard and determine where the lines of continuity are (what lines of holes are connected to other lines of holes). Part 2 Identify the 7400 Series TTL gates and look up their data sheets; 7400, 7404, 7408 and 7432 find the gate pin outs for each chip. Describe in your lab report each of their functions. Also show their logic symbol, use the function in an equation and show the Truth Table for one gate in each of the integrated circuits. This needs to be done for each of the four integrated circuits (ICs) (chips). Part 3 Gate testing: Test each gate in the simulator (MultiSim). Verify the truth table of each gate. Create a truth table base on the information gathered in part 2, have a columns for both inputs (count in binary), a column for the output based on gate specification, another for the simulator results, and the last output column for the lab results. After testing each gate in the simulator, build up each gate on the breadboard. Use the components from the lab kit. Select the 7404 (a package of six INVERTERs – usually called a hex INVERTER package). Place the 7404 chip across the center line (horizontal line) of your white breadboard and seat the device firmly (push down) on the breadboard. Find the dot that marks Pin 1 (most device have a notch at one end – if so, Pin 1 is to the left of the notch and on the corner of the device.) Viewed from the top, pin numbers always go counter-clockwise. Using RED wire, connect Pin 14 to +5 volts. Using BLACK wire, connect Pin 7 to GROUND. One of the six INVERTERS has its input pin on Pin 1, and its corresponding output on Pin 2. Connect the INVERTER’s input to a switch and the output to an LED. Test to see if the function works properly. Compare this output data to the truth table for this device. Go on and test to the other five “gates” as we call them. When you complete the 7404 IC, continue testing the other three Integrated Circuits (ICs). The 7400 is a quad NAND gate, the 7408 is a quad AND gate, and the 7432 is a quad OR gate. Test each gate of each Integrated Circuit (IC). Record your results for your lab report. Since each gate had two inputs, you must use two switches for each gate. You still only need one LED for the one output of each gate. Part 4 Test all four chips together, there should be two inputs and four outputs, there should be an output for each function or gate type. Before building the circuit on the breadboard test the circuit in the simulator (MultiSim). Wire up one LED to each of the gate function’s output. ALL the LEDs are connected at the same time. There should be 4 LEDs used: one for the NAND (7400), one for the NOT or Inverter (7404), one for the AND (7408), and one for the OR (7432). That takes care of the outputs. For the inputs you only need two switches that will connect to each gate. {note: the 7404 (inverter) only needs one switch connected to the input}. Your complete the circuit; it will have a total of 4 LEDS, and 2 switches (along with 4 ICs). Test and record the functions by observing the 4 outputs when you place the 4 possible input patterns – 00, 01, 10, 11 on the switches. Create a schematic for this Part and put it in your lab report.