Introduction to ComputersS1.1.1 Bina © 1998 Liran & Ofir Programming in C
Introduction to ComputersS1.1.2 Bina © 1998 Liran & Ofir Introduction to Computers Programming in C
Introduction to ComputersS1.1.3 Bina © 1998 Liran & Ofir Central Processing Unit Basic Model of Computers Control Processing Unit (CPU) n Control Processing Unit (CPU) l Executes Programs l Program = A Sequence of Machine A Sequence of Machine Instructions Instructions
Introduction to ComputersS1.1.4 Bina © 1998 Liran & Ofir Central Processing Unit Basic Model of Computers Control Unit Control Unit (CU) n Control Unit (CU) l Determines which instruction must be executed next. must be executed next. l Retrieves the needed data from the memory the memory l Coordinates the execution of the instruction of the instruction
Introduction to ComputersS1.1.5 Bina © 1998 Liran & Ofir Central Processing Unit Control Unit Basic Model of Computers Arithmetic Logic Unit Arithmetic Logic Unit (ALU) n Arithmetic Logic Unit (ALU) l Performs Simple operations: Add, Subtract, Multiply,...
Introduction to ComputersS1.1.6 Bina © 1998 Liran & Ofir Central Processing Unit Basic Model of Computers Control Unit Arithmetic Logic Unit Registers Registers n Registers l Fast memory used to hold the intermediate result of the intermediate result of operations operations
Introduction to ComputersS1.1.7 Bina © 1998 Liran & Ofir Central Processing Unit Basic Model of Computers Memory Control Unit Arithmetic Logic Unit Registers Memory (RAM) n Memory (RAM) l holds data and instructions instructions l Random Access l volatile
Introduction to ComputersS1.1.8 Bina © 1998 Liran & Ofir Central Processing Unit Memory Basic Model of Computers Disk Control Unit Arithmetic Logic Unit Registers Disk n Disk l holds data and programs programs l nonvolatile
Introduction to ComputersS1.1.9 Bina © 1998 Liran & Ofir Central Processing Unit Memory Basic Model of Computers Disk Control Unit Arithmetic Logic Unit Registers And other peripherals n And other peripherals Display Printer...
Introduction to ComputersS Bina © 1998 Liran & Ofir Central Processing Unit Memory Basic Model of Computers Bus n Bus Data passage way l Data passage way between parts of between parts of the computer the computer Display Disk Control Unit Arithmetic Logic Unit Registers Printer...
Introduction to ComputersS Bina © 1998 Liran & Ofir CPUCPU n Repeatedly does the following: l Gets the next instruction from the memory l Gets the data required to execute the instruction from the memory l Performs the instruction l Stores the result in the memory
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions n Add the content of memory location 6 to the content of memory location 7 and store the result in memory location 8. Load 6 Add 7 Store 8 End
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End 1
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End 1 Add 7
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End 1 5 Add 7
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End 1 5 Add 7
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Add 7 Load 6 Add 7 Store 8 End 1 5 6
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Load 6 Add 7 Store 8 End Store 8
Introduction to ComputersS Bina © 1998 Liran & Ofir Machine Instructions CPU Memory Store 8 Load 6 Add 7 Store 8 End 1 5 6
Introduction to ComputersS Bina © 1998 Liran & Ofir MemoryMemory n A Sequence of Memory Cells (Words) Memory Word
Introduction to ComputersS Bina © 1998 Liran & Ofir WordWord n A Sequence of 4 Bytes Word Byte 0Byte 3Byte 2Byte 1
Introduction to ComputersS Bina © 1998 Liran & Ofir Byte 0Byte 3Byte 2Byte 1 ByteByte n A Sequence of 8 Bits Word
Introduction to ComputersS Bina © 1998 Liran & Ofir BitBit n A switch capable of being in one of two states: Word l On state: Represents 1 l Off state: Represents
Introduction to ComputersS Bina © 1998 Liran & Ofir Decimal Numbers n Each digit is: l 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 l 453 => 3x x x10 2
Introduction to ComputersS Bina © 1998 Liran & Ofir Binary Numbers n Each digit is: l 0, 1 l 101 => 1x x x2 2 => 5
Introduction to ComputersS Bina © 1998 Liran & Ofir Ex - Decimal Numbers n Each digit is: l 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F l 1E3 => 3x x x16 2 => 343