LAB Report
LAB Report
Address = 16bits
D7 D6 D5 D4 D3 D2 D1 D0
S Z ------ A.C ------- P ------ C
1.Signs flag (S): After any operation if a result is negative sign, sign
flag becomes set (1) otherwise sign becomes reset (0). For example:
S 1 S 0
2.Zero flag (Z): After any arithmetic or logical operation if the result
is zero flag becomes set (1) otherwise it becomes reset (0). For
example:
(MVI A, 10H)
(MVI B, 10H)
SUB B (A = 10-10)
00H
(MVI A, 00H)
(MVI B, 01H)
A 00H 00
B 01H +01
ADD B
0010 0101
+ 0011 0101
0101 1010 (Here the parity value is even so the parity flag
become set (1).
5.Carry flag (C): If last operation generates a carry, its status will be
set (1) otherwise it becomes reset (0). For example:
(MVI A, FFH)
(MVI B, FFH)
ADD B
1111 1111
+1 1 1 1 +1111
1111 1110
Timing and control unit: It provides timing and control signal to the
microprocessor to perform operations. following are the timing and
control signals.