Friday, August 26, 2016

Flags in Microprocessor (8085 and 8086)


Flags is an status register containing flip-flops that shows the current status of the processor. Flags helps the processor to determine the changes made by any Arithmetic Operation.
8085 microprocessor has an 8-bit flags register with 5- bit positions. Flags namely,
  • Sign Flag
  • Zero Flag
  • Auxiliary Carry Flag
  • Parity Flag
  • Carry Flag
are present in 8085.


Sign Flag (S): It is set (1) when the result of an operation is less than 0 or the answer is negative.

Zero Flag (Z): It is set when the result obtained is zero.

Axuiliary Carry Flag (AC): It is set when there is an carry from the lower nibble to the upper nibble.

Parity Carry (P): It is set when there is an even number of 1's.

Carry Flag (C): It is set when there is an carry or borrow during an addition or subtraction operation.

8086 Microprocessor has 16-bit status register with 9-bit postions that includes all the flags provided by 8085 with the addition of 4 other flags for string manupulation, interrupt handling and debugging. The flags in 8086 microprocessor are,
  • OverFlow Flag
  • Direction Flag
  • Interrupt Flag
  • Trap Flag
  • Sign Flag
  • Zero Flag
  • Auxiliary Carry Flag
  • Parity Flag
  • Carry Flag

Overflow Flag (OF): It is set (1) when the result of an operation exceeds / overflows the capacity.

Direction Flag (DF): It is set by the user to specify the direction in which data is read. It is used in string manipulation.

Interrupt Flag (IF): It is set to disable the hardware interrupt temporarily.

Trap Flag (TF): It is used to change the exection process to Single Step Execution. It is used by debuggers for debugging process as it helps to find the source of error.

The Sign Flag (SF), Zero Flag (ZF), Auxiliary Carry Flag(AC), Parity Flag (PF) and Carry Flag (CF) has the same functionalities as the flags in 8085.

Thursday, August 25, 2016

Difference between Microprocessor and MicroController



Microprocessors are Programmable, Clock-Driven, Register-Based electronic device that takes binary input , processes them according to the instruction stored in the memory and provides result as output. Microprocessors are the heart of Modern Computers.

Micro-controllers are self-contained system that in-cooperates processor, peripherals (RAM, ROM, I/O controls , Clock/Timers, etc) and memory that can be used as an embedded system.They are used in a wide application ranging from toys to Automobiles. An automobile may contain many hundreds of micro-controllers.

Attribute Microprocessor Micro-controller
Defination Programmable, Clock-Driven, Register-Based electronic device that in-cooperates CPU within a single chip A single chip that in-cooperates processor, RAM, ROM, Timer / Clock , I/O control Unit, etc.
Used in Servers, Desktop Computers, Laptops, Mobile Devices products ranging from toys to automobile
Cost expensive cheaper
Electronic Circuit Density higher lower
Components 3 components (ALU, CU, Registers) all components inbuilt (i.e. RAM, ROM, Timers, I/O, etc.)
Additional Circuits can be added cannot be added
Designed To Perform Huge set of general functions Small set of Specific functions