Presentation is loading. Please wait.

Presentation is loading. Please wait.

Micro-Computer Applications: Number system & 8086 Organization Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011.

Similar presentations


Presentation on theme: "Micro-Computer Applications: Number system & 8086 Organization Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011."— Presentation transcript:

1 Micro-Computer Applications: Number system & 8086 Organization Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011

2 Dr. Amr Talaat ELECT 707 Micro-Computer Applications The Microprocessor Age  World’s first microprocessor the Intel 4004.  A 4-bit microprocessor-programmable controller o n a chip.  Addressed 4096, 4-bit-wide memory locations.  a bit is a binary digit with a value of one or zer o  4-bit-wide memory location often called a nibbl e  The 4004 instruction set contained 45 instructions.

3 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Main problems with early microprocessor were spe ed, word width, and memory size.  Evolution of 4-bit microprocessor ended when Intel released the 4040, an updated 4004.  operated at a higher speed; lacked improvement s in word width and memory size  Texas Instruments and others also produced 4-bit microprocessors.  still survives in low-end applications such as mic rowave ovens and small control systems  Calculators still based on 4-bit BCD (binary-cod ed decimal) codes

4 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Intel released 8008 in 1971.  extended 8-bit version of 4004 microprocessor  Addressed expanded memory of 16K bytes.  A byte is generally an 8-bit-wide binary number and a K is 1024.  memory size often specified in K bytes  Contained additional instructions, 48 total.  Provided opportunity for application in more advanc ed systems.  engineers developed demanding uses for 8008

5 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Intel introduced 8080 microprocessor in 1973.  first of the modern 8-bit microprocessors  Motorola Corporation introduced MC6800 micropr ocessor about six months later.  8080—and, to a lesser degree, the MC6800—ushe red in the age of the microprocessor.  other companies soon introduced their own ver sions of the 8-bit microprocessor

6 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Only Intel and Motorola continue to create new, i mproved microprocessors.  IBM also produces Motorola-style microprocesso rs  Motorola sold its microprocessor division.  now called Freescale Semiconductors, Inc.  Zilog still manufactures microprocessors.  microcontrollers and embedded controllers inste ad of general-purpose microprocessors

7 Dr. Amr Talaat ELECT 707 Micro-Computer Applications The Modern Microprocessor  In 1978 Intel released the 8086; a year or so later, it released the 8088.  Both devices are 16-bit microprocessors.  executed instructions in as little as 400 ns (2.5 millions of instructions per second)  major improvement over execution speed of 80 85  8086 & 8088 addressed 1M byte of memory.  16 times more memory than the 8085  1M-byte memory contains 1024K byte-sized m emory locations or 1,048,576 bytes

8 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Increased memory size and additional instructions in 8086/8088 led to many sophisticated application s.  Improvements to the instruction set included multi ply and divide instructions.  missing on earlier microprocessors  Number of instructions increased.  from 45 on the 4004, to 246 on the 8085  over 20,000 variations on the 8086 & 8088

9 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  These microprocessors are called CISC (complex i nstruction set computers).  additional instructions eased task of developing efficient and sophisticated applications  16-bit microprocessor also provided more internal register storage space.  Popularity of Intel ensured in 1981 when IBM chose the 8088 in its personal computer.

10 Dr. Amr Talaat ELECT 707 Micro-Computer Applications THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM  Computers have undergone many changes recently.  Machines that once filled large areas reduced to small desktop computer systems because of the microprocessor.  although compact, they possess computing power only dreamed of a few years ago

11 Dr. Amr Talaat ELECT 707 Micro-Computer Applications The block diagram of a microprocessor-based computer system. a bus is the set of common connections that carry the same type of information

12 Dr. Amr Talaat ELECT 707 Micro-Computer Applications The Microprocessor  Called the CPU (central processing unit).  The controlling element in a computer system.  Controls memory and I/O through connections call ed buses.  buses select an I/O or memory device, transfer data between I/O devices or memory and the m icroprocessor, control I/O and memory systems  Memory and I/O controlled via instructions stored i n memory, executed by the microprocessor.

13 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Microprocessor performs three main tasks:  data transfer between itself and the memory or I/O systems  simple arithmetic and logic operations  program flow via simple decisions  Power of the microprocessor is capability to execut e billions of millions of instructions per secon d from a program or software (group of instru ctions) stored in the memory system.  stored programs make the microprocessor and c omputer system very powerful devices

14 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  Another powerful feature is the ability to make simple decisions based upon numerical facts.  a microprocessor can decide if a number is zero, positive, and so forth  These decisions allow the microprocessor to modif y the program flow, so programs appear to think through these simple decisions.

15 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Buses  A common group of wires that interconnect compon ents in a computer system.  Transfer address, data, & control information betwe en microprocessor, memory and I/O.  Three buses exist for this transfer of information: a ddress, data, and control.  Figure 1–12 shows how these buses interconnect v arious system components.

16 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Figure 1–12 The block diagram of a computer system showing the address, data, an d control bus structure.

17 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  The address bus requests a memory location from the memory or an I/O location from the I/O device s.  if I/O is addressed, the address bus contains a 1 6-bit I/O address from 0000H through FFFFH.  if memory is addressed, the bus contains a mem ory address, varying in width by type of microprocessor.  64-bit extensions to Pentium provide 40 address pi ns, allowing up to 1T byte of memory to be access ed.

18 Dr. Amr Talaat ELECT 707 Micro-Computer Applications  The data bus transfers information between the mi croprocessor and its memory and I/O address spac e.  Data transfers vary in size, from 8 bits wide to 64 bits wide in various Intel microprocessors.  8088 has an 8-bit data bus that transfers 8 bits of data at a time  8086, 80286, 80386SL, 80386SX, and 80386EX transfer 16 bits of data  80386DX, 80486SX, and 80486DX, 32 bits  Pentium through Core2 microprocessors transfer 64 bits of data

19 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Organization of 8088 AHAL BHBL CHCL DHDL SP BP SI DI ALU Flag register Execution Unit (EU) EU control  CS DS SS ESALU Data bus (16 bits) Address bus (20 bits) Instruction Queue Bus control External bus IP Data bus (16 bits) Bus Interface Unit (BIU) General purpose register Segment register

20 Dr. Amr Talaat ELECT 707 Micro-Computer Applications General Purpose Registers 15870 AX BX CX DX AHAL BHBL CHCL DHDL Accumulator Base Counter Data SP BP SI DI Data Group Pointer and Index Group Stack Pointer Base Pointer Source Index Destination Index

21 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Microprocessors3-21 Arithmetic Logic Unit (ALU) n bits AB Y F Carry Y= 0 ? A > B ? F Y 0 0 0 A + B 0 0 1A - B 0 1 0A - 1 0 1 1A and B 1 0 0A or B 1 0 1 not A     Signal F control which function will be conducted by ALU.  Signal F is generated according to the current instruction.  Basic arithmetic operations: addition, subtraction,   Basic logic operations: and, or, xor, shifting, 

22 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flag Register  OFDFIFTFZFSF  AFPFCF  015  Control Flags  Status Flags IF:Interrupt enable flag DF:Direction flag TF:Trap flag CF:Carry flag PF:Parity flag AF:Auxiliary carry flag ZF:Zero flag SF:Sign flag OF:Overflow flag  Flag register contains information reflecting the current status of a microprocessor. It also contains information which controls the operation of the microprocessor. 

23 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Instruction Machine Codes  Instruction machine codes are binary numbers  For Example: 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 MOV AL, BL MOV  Machine code structure OpcodeOperand1  Opcode tells what operation is to be performed.  EU control logic generates ALU control signals accordi ng to Opcode)  Some instructions do not have operands, or have only one operand  Operands tell what data should be used in the operation. Operands can be addresses telling where to get data (or where to store results) Register mode ModeOperand2  Mode indicates the type of a instruction: Register type, or Memory type

24 Dr. Amr Talaat ELECT 707 Micro-Computer Applications EU Operation 1. Fetch an instruction from instruction queue 2. According to the instruction, EU control logic generates control signals. ( This process is also referred to as instruction decoding) 3. Depending on the control signal, EU performs one of the following operations:  An arithmetic operation  A logic operation  Storing a datum into a register  Moving a datum from a register  Changing flag register

25 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Registers  A register is a storage element inside a m icroprocessor.  Almost all operations would involve using registers.  Some registers are general purpose regis ters, while others have special purposes.  General purpose registers can hold various da ta sizes and used for almost any purpose as d ictated by the program.  However, each general purpose register does have its own special purposes.

26 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Registers

27 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Registers Since the x86 instr uction set is design ed to be compatible with previous micro processors, the sam e register can be ac cessed using differe nt names. Different names are given for 64-bit, 32 -bit, 16-bit and 8-b it version of the sam e register.

28 Dr. Amr Talaat ELECT 707 Micro-Computer Applications General Purpose Registers  RAX, EAX, AX (AH & AL)  A general purpose register  Also an accumulator – stores intermediate res ults after arithmetic and logic operations  Can also hold the offset address of a location in memory (80386 and above)  RBX, EBX, BX (BH & BL)  A general purpose register  Also a base index register – holds the offset a ddress of a location in memory  Can also address memory data (80386 and a bove)

29 Dr. Amr Talaat ELECT 707 Micro-Computer Applications General Purpose Registers  RCX, ECX, CX (CH & CL)  A general purpose register  Also a count register – holds the count for var ious instructions  Can also hold the offset address of a location in memory (80386 and above)  RDX, EDX, DX (DH & DL)  A general purpose register  Also a data register – stores data related to a ccumulator’s calculation (multiply and divide)  Can also address memory data (80386 and a bove)

30 Dr. Amr Talaat ELECT 707 Micro-Computer Applications General Purpose Registers  RBP, EBP, BP  A general purpose register  Also a base pointer register – points to a me mory location for memory data transfer  RDI, EDI, DI  A general purpose register  Also a destination index register – holds the memory address for the destination data of a string instruction

31 Dr. Amr Talaat ELECT 707 Micro-Computer Applications General Purpose Registers  RSI, ESI, SI  A general purpose register  Also a source index register - holds the memo ry address for the source data of a string instr uction  R8 through R15  General purpose registers  Found only in 64-bit microprocessors  Data are addressed in 64-, 32-, 16-, or 8-bit sizes

32 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Special Purpose Registers  RIP, EIP, IP  Instruction pointer – points to the next instru ction in the memory to be executed  RSP, ESP, SP  Stack pointer – points to an area in memory c alled the stack  RFLAGS, EFLAGS, FLAGS  Indicates the condition of the microprocessor and control its operation

33 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flags

34 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flags  The C, P, A, Z, S and O flags are changed by mo st arithmetic and logic operations.  Flags never change for any data transfer or prog ram control operations.  Some flags are also used to control features fou nd in the microprocessor.

35 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flags  Descriptions for some of the flag bits:  C (carry): holds the carry after addition or bo rrow after subtraction.  P (parity): the count of 1s in a number expres sed as even or odd.  0 for odd, 1 for even.  A (auxiliary carry): holds the half-carry after addition or the borrow after subtraction betw een bit positions 3 and 4 of the result.

36 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flags  Z (zero): shows that the result of an arithmet ic or logic operation is zero.  0 result is not zero, 1 result is zero.  S (sign): holds the arithmetic sign of the resu lt after an arithmetic or logic instruction exec utes.  0 for positive, 1 for negative.  T (trap): enables trapping through an on-chip debugging feature.  0 disable trapping, 1 enable trapping.  If enabled, allows the microprocessor to interrupt th e flow of the program on conditions indicated by the debug registers and control registers.  Microsoft Visual Studio debugging tool uses this feat ure.

37 Dr. Amr Talaat ELECT 707 Micro-Computer Applications Flags  I (interrupt): control the operation of the INTR (interrupt request) input pin.  0 disables INTR pin, 1 enables INTR pin.  D (direction): selects increment or decre ment mode for SI/DI registers.  0 increment, 1 decrement.  O (overflow): indicates that the result of an addition/subtraction of signed number s exceeded the capacity of the machine.


Download ppt "Micro-Computer Applications: Number system & 8086 Organization Dr. Eng. Amr T. Abdel-Hamid ELECT 707 Fall 2011."

Similar presentations


Ads by Google