8051 and 8086 Cheat Sheet:
8051 Microcontroller
Function
The 8051 is used for controlling embedded systems. It integrates CPU, memory, I/O ports, timers, and serial communication on a single chip. Commonly used in automation, robotics, and real-time control systems.
| Feature | Details |
|---|---|
| Type | 8-bit Microcontroller |
| Architecture | Harvard Architecture |
| Memory | 4KB ROM, 128B RAM |
| I/O Ports | 4 Ports (P0–P3) |
| Timers | 2 Timers |
| Interrupts | 5 Interrupts |
Important Instructions & Functions
| Instruction | Function |
|---|---|
| MOV A, B | Copies data from B to A |
| ADD A, R1 | Adds register R1 to accumulator |
| SUBB A, R2 | Subtract with borrow |
| INC A | Increment accumulator by 1 |
| DEC R0 | Decrement register |
| ANL A, #data | Bitwise AND |
| ORL A, #data | Bitwise OR |
| XRL A, #data | Bitwise XOR |
| SJMP label | Short jump (within range) |
| LJMP addr | Long jump anywhere in memory |
| DJNZ R1, label | Decrement and jump if not zero |
| CJNE A, #data, label | Compare and jump if not equal |
8086 Microprocessor
Function
The 8086 is a general-purpose microprocessor used for executing programs. It separates execution into Bus Interface Unit (BIU) and Execution Unit (EU), enabling instruction pipelining and faster processing.
| Feature | Details |
|---|---|
| Type | 16-bit Microprocessor |
| Address Bus | 20-bit (1 MB memory) |
| Instruction Queue | 6-byte prefetch queue |
| Segments | CS, DS, SS, ES |
Important Instructions & Functions
| Instruction | Function |
|---|---|
| MOV AX, BX | Transfers data from BX to AX |
| ADD AX, BX | Adds BX to AX |
| SUB AX, BX | Subtracts BX from AX |
| MUL BX | Unsigned multiplication |
| DIV BX | Division |
| INC AX | Increment AX |
| DEC BX | Decrement BX |
| AND AX, BX | Bitwise AND |
| OR AX, BX | Bitwise OR |
| XOR AX, BX | Bitwise XOR |
| JMP label | Unconditional jump |
| JZ label | Jump if zero flag = 1 |
| JNZ label | Jump if zero flag = 0 |
| CALL addr | Call procedure |
| RET | Return from procedure |
8051 vs 8086
| Feature | 8051 | 8086 |
|---|---|---|
| Main Function | Control hardware (embedded) | Execute programs |
| Type | Microcontroller | Microprocessor |
| Data Width | 8-bit | 16-bit |
| Architecture | Harvard | Von Neumann |
| Usage | Embedded systems | General computing |