FILE_COA
FILE_COA
Experiment No. 1
THEORY: 74153 is a dual 4 line-to-1 line multiplexer. It has the schematic representation shown in
Fig 1. Selection lines A and B select the particular input to be multiplexed and applied to the output
IY{1 = 1, 2}.Each of the strobe signals IG {I = 1, 2} acts as an enable signal for the corresponding
multiplexer.Figure 2(a) & 2(b) shows the multiplex function of 74153 in terms of select lines. Note that
each of the on-chip multiplexers act independently from the other, while sharing the same select lines
A and B.
0 0 1 1C1
0 1 0 1C2
0 1 1 1C3
The above circuit diagram shows the detail gate level structure of 74153(Dual 4 line to 1 line
Multiplexer)
74157 is a quad 2 line-to-1 line multiplexer. It has the schematic representation shown in Fig 3. Select
line select the particular input to be multiplexed and applied to the output IY{1 = 1, 2, 3, 4}. Strobe
signal acts as an enable signal for each of the four multiplexers. Figure 4(a) & 4(b) & 4(c) & 4(d)
shows the multiplex function of 74157 in terms of select lines. Note that each of the on-chip
multiplexers act independently from the other, while sharing the same select line.
Figure 3(74157)
Experiment No. 2
THEORY : Subtractor circuits take two binary numbers as input and subtract one binary number input
from the other binary number input. Similar to adders, it gives out two outputs, difference and borrow
(carry-in the case of Adder)
1. Half Subtractor
2. Full Subtractor
1) Half Subtractor
The half-subtractor is a combinational circuit which is used to perform subtraction of two bits. It has
two inputs, A (minuend) and B (subtrahend) and two outputs Difference and Borrow. The logic symbol
and truth table are shown below.
From the above truth table we can find the boolean expression.
Difference = A ⊕ B
Borrow = A' B
From the equation we can draw the half-subtractor circuit as shown in the figure 3.
2) Full Subtractor
A full subtractor is a combinational circuit that performs subtraction involving three bits, namely A
(minuend), B (subtrahend), and Bin (borrow-in) . It accepts three inputs: A (minuend), B (subtrahend)
and a Bin (borrow bit) and it produces two outputs: D (difference) and Bout (borrow out). The logic
symbol and truth table are shown below.
From the above truth table we can find the boolean expression.
D = A ⊕ B ⊕ Bin
Bout = A' Bin + A' B + B Bin
From the equation we can draw the Full-subtractor circuit as shown in the figure 6.
Experiment No. 3
THEORY: To implement Half and full adder by using basic and universal gates.
Adders
Digital computers perform a variety of information processing tasks. Among the basic tasks
encountered are the various arithmatic operartions. The most basic arithmatic operation is the additon
of two binary digits.
A combinational circuit that performs the addition of two bits is called a half adder. Again the
combinational circuit that performs addition of three bits (Two significant bits and a previous carry) is
called Full adder.
Half Adder
A half adder is a combinational circuit with two binary inputs (augend and addend bits) and two binary
outputs (sum and carry bits). It adds two inputs (A and B) and produces the sum (S) and the carry (C)
bits. It is an arithmatic circuit used to perform the arithmatic operaton of addition of two single bit
words.
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Cout = AB
When any of the inputs A and B is equal to 1, the Sum is 1. Otherwise, it is 0. Carry Cout is 1 only
when both the inputs are 1.
Full Adder
The combinational circuit that performs addition of three bits (Two significant bits and a previous
carry) is called Full adder.
Truth Table
The Sum is High i.e. 1 only when odd number of the inputs are High. Carry Cout is High i.e. 1 only
when more than one input are High.
The Sum is High i.e. 1 only when odd number of the inputs are High. Carry Cout is High i.e. 1 only
when more than one input are High.
Experiment No. 4
AIM: Write a program in assembly language to enter two values in register and perform
addition
START
Move to AX
Move BX to AX
Move to AX
Add AX to BX
STOP
OBSERVATION TABLE:-
Conclusion:
Hence the program was successfully executed.
Experiment No. 5
AIM: Write a program in assembly language to enter two values in register and perform
subtraction.
ALGORITHM:
1. Initialize G.P. register
2. Transfer data 05 in AX
3. Transfer data in 04 BX
4. subtract the data
5. Stop
FLOWCHART
START
Initialize g.p.register
Move data in AX
Move data in BX
SUB AX FROM BX
STOP
OBSERVATION TABLE:-
Experiment No. 6
AIM: write a program in assembly language to enter two values in register and perform
multiplication.
ALGORITHM:
1. Initialize AX register
2. Initialize BX register
3. multiply the data
4. Stop
FLOWCHART
START
Move 05 in AX
Move 02 in BX
A
Multiplication of AX and BX
STOP
OBSERVATION TABLE:-
Conclusion:
Hence the program was successfully executed.
Experiment No. 7
AIM: write a program in assembly language to enter two values in register and perform
division.
ALGORITHM:
1. Initialize AX register
2. Initialize BX register
3. divide the data AX from BX register
4. Stop
FLOWCHART
START
Move to AX
Move to BX
A
DIV AX AND BX
STOP
OBSERVATION TABLE:-
Conclusion:
Experiment No. 8
AIM: Write a program to add a data byte located at offset 0500H in 2000H segment to
another data byte available at 0600H in same segment and store the resulting 0700H in same
segment.
ALGORITHM:
1) Initialise segment register
2) Get contain in 0500H in G.P. register
3) Perform addition
4) store result in 0700H
FLOWCHART
START
Perform Addition
STOP
OBSERVATION TABLE:-
Conclusion:
Hence the program was successfully executed.
Experiment No. 9
AIM: Write a program to find out the largest number from an unordered array of sixteen 8-
bit numbers stored sequentially in the memory location starting at offset 0500H in the
segment 2000H.
No Next
no.>1
yes
Replace the first number by the next number
STOP
OBSERVATION TABLE:-
PO NC
8 0B27:0110 7302 JNC NV UP EI PL NZ AC
PE NC
0B27:0114
9 0B27:0112 8B04 MOV AX,[SI] NV UP EI PL NZ AC
PE NC
10 0B27:0114 E2F7 LOOP NV UP EI PL NZ AC
PE NC
0B27:010D
11 0B27:0116 F4 HLT NV UP EI PL NZ NA
PE NC
Conclusion:
Hence the program was successfully executed.
Experiment No. 10
AIM: Write a program to move a byte string, 16 bytes long, from the offset 0200H to
0300H in the segment 7000H.
ALGORITHM:
1) Data segment initialization
2) Initialize source pointer
3) Initialize destination pointer
4) Initialize counter for number of iteration
5) Take a source byte in AX
6) Move it to destination
7) Increment source pointer
8) Increment destination pointer
9) Decrement counter by 1
10) Continue if count is not 0
11) Stop if the count is 0
FLOWCHART
START
NO
Counter=0
?
yes
STOP
OBSERVATION TABLE:-
Conclusion:
Hence the program was successfully executed.