Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Fundamental of Computer Suthida Chaichomchuen : SCC

Similar presentations


Presentation on theme: "1 Fundamental of Computer Suthida Chaichomchuen : SCC"— Presentation transcript:

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

2 2 Computer Components n Hardware (architecture) n Software (instruction set)

3 3 Basic Hardware n Bits n Bytes n Registers n Memory n Processor n Data Bus

4 4 Hardware Components n Internal hardware –Microprocessor –Memory –Registers n External hardware –Input/Output Devices

5 5 Software Organization n Programs n Data files n Operating System

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

7 7 Related bytes n Word n Doubleword n Quadword n Paragraph n Kilobyte n Megabyte

8 8 Binary numbers 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

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

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

11 11 Hexadecimal Representation Binary :1011100111001110 Decimal : 11 9 12 14 Hexadecimal : B 9 C E

12 12 System Unit n A system board –Microprocessor –ROM –RAM n Power supply n Expansion slots

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

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

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

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

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

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

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

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

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

22 22 Internal Memory n ROM (Read Only Memory) n RAM (Random Access Memory)

23 23 Map of Base Memory 64K base system ROM 192K memory expansion area (ROM) 640K memory (RAM) conventional memory upper memory 128K video display area (RAM) Start Address DecHex 960KF0000 768KC0000 640KA0000 zero00000 Purpose

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

25 25 memory Address 7613 most significant byte register0529 05 Address 7612 least significant byte Addressing data in memory

26 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 27 Main Segments n Code Segment –contains the machine instructions that are to execute n Data Segment –contains a program’s defined data, constants, and work areas.

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

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

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

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

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

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

34 34 Registers n Segment Registers n Pointer Registers n General-Purpose Registers n Index Registers n Flags Register

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

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

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

38 38 Pointer Registers n 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 39 Pointer Registers... n Stack Pointer (SP) register –Refers to the current word being processed in the stack. n Base Pointer (BP) register –Facilitates referencing parameters.

40 40 General-Purpose Registers n AX register : Accumulator –Used for operations involving input/output and most arithmetic. EAX: AX:AHAL

41 41 General-Purpose Registers n BX register : Base register –Used as an index to extend addressing. EBX: BX:BHBL

42 42 General-Purpose Registers... n 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. ECX: CX:CHCL

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

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

45 45 Flags Register 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

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

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

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

49 49 Flags Register... n PF (parity) –Indicates even or odd parity of a low- order 8-bit data operation. n 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.


Download ppt "1 Fundamental of Computer Suthida Chaichomchuen : SCC"

Similar presentations


Ads by Google