1 / 49

Fundamental of Computer

Fundamental of Computer. Suthida Chaichomchuen : SCC std@kmitnb.ac.th. Computer Components. Hardware (architecture) Software (instruction set). Basic Hardware. Bits Bytes Registers Memory Processor Data Bus. Hardware Components. Internal hardware Microprocessor Memory Registers

brier
Télécharger la présentation

Fundamental of Computer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fundamental of Computer Suthida Chaichomchuen : SCC std@kmitnb.ac.th

  2. Computer Components • Hardware (architecture) • Software (instruction set)

  3. Basic Hardware • Bits • Bytes • Registers • Memory • Processor • Data Bus

  4. Hardware Components • Internal hardware • Microprocessor • Memory • Registers • External hardware • Input/Output Devices

  5. Software Organization • Programs • Data files • Operating System

  6. Computer storage • Bit • On : 1 • Off : 0 • Byte • data : 8 bits • parity : 1 bit (automatically setting)

  7. Related bytes • Word • Doubleword • Quadword • Paragraph • Kilobyte • Megabyte

  8. Bit value : 1 1 1 1 1 1 1 1 Position value : 128 64 32 16 8 4 2 1 Bit number : 7 6 5 4 3 2 1 0 Binary numbers

  9. Binary arithmetic Decimal Binary 65 01000001 +42+00101010 107 01101011 Decimal Binary 60 00111100 +53+00110101 113 01110001

  10. Negative Binary Numbers Reverse the bit value and add 1 Number +65 : 01000001 Reverse the bits : 10111110 Add 1 : 1 Number -65 : 10111111

  11. Hexadecimal Representation Binary : 1011 1001 1100 1110 Decimal : 11 9 12 14 Hexadecimal : B 9 C E

  12. System Unit • A system board • Microprocessor • ROM • RAM • Power supply • Expansion slots

  13. Processors (Intel family) • 8088/80188 • 8086/80186 • 80286 • 80386 • 80486 • Pentium (or 80586) • PentiumPro (or 6x86)

  14. Processors : 8088/80188 • 16-bit registers • 8-bit data bus • address up to 1 million bytes of memory • registers process 2 bytes/time • data bus transfer 1 byte/time • operate in real mode

  15. Processors : 8086/80186 • 16-bit registers • 16-bit data bus & run faster • address up to 1 million bytes of memory • registers process 2 bytes/time • data bus transfer 2 bytes/time • operate in real mode

  16. Processors : 80286 • 16-bit registers • 16-bit data bus & run faster • address up to 16 million bytes of memory • operate in real mode or protected mode

  17. Processors : 80386 • 32-bit registers • 32-bit data bus • address up to 4 billion bytes of memory • operate in real mode or protected mode

  18. Processors : 80486 • 32-bit registers • 32-bit data bus • address up to 4 billion bytes of memory • operate in real mode or protected mode • processor is designed for enhanced performance

  19. Processors : Pentium (or 80586) • 32-bit registers • 64-bit data bus • execute more than one instruction/clock cycle

  20. Processors : PentiumPro (or 80686) • advances the capacity of registers and the data bus • connected to a build-in storage cache by a 64-bit wide bus

  21. Logical Units in Processor • Bus Interface Unit <BIU> • Manage the bus control unit, segment registers and instruction queue. • Provide access to instructions. • Execution Unit <EU> • Execute instructions and get data that the BIU delivered.

  22. Internal Memory • ROM (Read Only Memory) • RAM (Random Access Memory)

  23. Start Address Dec Hex 960K F0000 768K C0000 640K A0000 zero 00000 Purpose 64K base system ROM 192K memory expansion area (ROM) upper memory 128K video display area (RAM) 640K memory (RAM) conventional memory Map of Base Memory

  24. Addressing data in memory • System stores the data in memory in reverse-byte sequence : • low-order byte : low memory address • high-order byte : high memory address

  25. register 05 29 29 05 memory Address 7612 least significant byte Address 7613 most significant byte Addressing data in memory

  26. Segments A segment is a special area defined in a program that begins on a paragraph boundary, that is, at a location evenly divisible by 16, or hex 10.

  27. Main Segments • Code Segment <CS> • contains the machine instructions that are to execute • Data Segment <DS> • contains a program’s defined data, constants, and work areas.

  28. Main Segments . . . • Stack Segment <SS> • contains any data and addresses that you need to save temporarily or for use by your own “called” subroutines.

  29. Stack Segment SS Address Relocatable in memory Address DS Data Segment Address CS Code Segment Segment Registers Memory Segment Boundaries

  30. Segment Offsets • Offset is the distance in bytes from the segment address to another location within the segment. • A 2-byte offset can range from 0000H - FFFFH (0-65,535). • Memory location = segment address + offset value

  31. . . . X X Segment address 038E0H Offset 32H Segment Offsets DS segment address : 038E0H Offset :+0032H Actual address : 03912H

  32. Addressing Capacity • 8086/8088 Addressing • 16 bits for addressing • 80286 Addressing • 24 bits for addressing • 80386/486/Pentium Addressing • In protected mode use 48 bits for addressing

  33. Registers The processor’s registers are used to control instructions being executed, to handle addressing of memory, and to provide arithmetic capability.

  34. Registers • Segment Registers • Pointer Registers • General-Purpose Registers • Index Registers • Flags Register

  35. Segment Registers • CS register • Contains the starting address of a program’s code segment. • DS register • Contains the starting address of a program’s data segment.

  36. Segment Registers . . . • SS register • The system stores the starting address of a program’s stack segment in the SS register. • ES register • Used by some string operations to handle memory addressing.

  37. Segment Registers . . . • FS and GS register • Additional extra segment registers on the 80386 and later processors.

  38. Pointer Registers • Instruction Pointer (IP) register • Contains the offset address of the next instruction that is to execute. • IP indicates the current instruction within the currently executing code segment.

  39. Pointer Registers . . . • Stack Pointer (SP) register • Refers to the current word being processed in the stack. • Base Pointer (BP) register • Facilitates referencing parameters.

  40. AX: AH AL EAX: General-Purpose Registers • AX register : Accumulator • Used for operations involving input/output and most arithmetic.

  41. BX: BH BL EBX: General-Purpose Registers • BX register : Base register • Used as an index to extend addressing.

  42. CX: CH CL ECX: General-Purpose Registers . . . • CX register : Count register • Contains a value to control the number of times a loop is repeated. • Contains a value to shift bits left or right.

  43. DX: DH DL EDX: General-Purpose Registers . . . • DX register : Data register • Used for input/output operations • Used for multiply and divide operations that involve large values.

  44. Index Registers • SI register • source index register is required for some string operations • SI is associates with DS register • DI register • destination index register is required for some string operations • DI is associates with ES register

  45. Flag: O D I T S Z A P C Bit no.: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Flags Register

  46. Flags Register • OF (overflow) • Indicates overflow of a high-order bit following arithmetic. • DF (direction) • Determines left or right direction for moving or comparing string data. • IF (interrupt) • Indicates that all external interrupts are to be processed or ignored.

  47. Flags Register . . . • TF (trap) • Permits operation of the processor in single-step mode. • SF (sign) • Contains the resulting sign of an arithmetic operation. • 0 : positive / 1 : negative

  48. Flags Register . . . • ZF (zero) • Indicates the result of an arithmetic or comparison operation. • 0 : nonzero / 1 : zero • AF (auxiliary carry) • Contains a carry out of bit 3 on 8-bit data, for specialized arithmetic.

  49. Flags Register . . . • PF (parity) • Indicates even or odd parity of a low-order 8-bit data operation. • CF (carry) • Contains carries from a high-order bit following an arithmetic operation. • Contains the contents of the last bit of a shift or rotate operation.

More Related