Professional Documents
Culture Documents
Register and Flags 2
Register and Flags 2
Register and Flags 2
What is a register?
A register is one of a small set of data holding
places that are part of a computer processor .
A register may hold :
a computer instruction
a storage address
or individual characters)
About Registers
Rarely more than 64 registers in number
Small in size
Typically a register is less than 64 bits in size
Registers Location
Performance
Registers Perform :
Fetch
Decode
Execute
Types of Registers:
1. Memory Address Register
(MAR)
Holds the memory addresses of data
and instructions
Carry Flag:
If 9th bit generated then the carry flag will be 1.
Types of Flag Registers
Auxiliary Carry Flag:
If the 4th bit contains carry then AC is 1.
Types of Flag Registers
Parity Flag:
If number of ones in the bit are even then
PF=1 else if number of ones in the bit are
odd then PF=0.
Example
Types of Flag Registers
Zero Flag:
If the answer is zero then ZF=1
otherwise ZF=0.
Types of Flag Registers
Overflow Flag:
If the bit are in the range -128 to 127
then OF=0 else OF=1.
Types of Flag Registers
Sign Flag:
If MSB=1 then SF=1 else MSB=0 then
SF=0.