Lecture 2 - Fetch, Execution and IO
Data is stored in Bits
1 byte = 8 bits
Bit - the smallest unit of data measurement in computer.
- it can be either 0 or 1.
Pulse of 5 volts of electricity = 1bit
Pulse of 0 volts of electricity = 0
1 bit - presence of light
0 bit - absence of light
A "byte" is a collection of 8 bits.
Functional units
1. Primary memory (main memory)
- Organized into words of typically 32 bits (contains four 8-bit bytes)
- Programs and their data must be in memory to be executed.
2. Cache memory (smaller and faster than main memory)
- Holds sections of the program and data currently/frequently being executed.
3. Processor
- Logic circuits: for performing arithmetic and logic operations on word-size data operands.
- Timing and control circuits: for fetching program instructions and data from memory, one after another.
- Registers (typically 16 or 36): holds one word of operand data sections of the program and data currently/frequently being executed.
Computer
- Computer accepts information in the form of programs and data and stored in the memory.
- Information stored in the memory is fetched under program control into an ALU, where it's processed.
- Processing information leaves the computer through an output unit.
- All activities in the computer are directed by the Control Unit.
Instruction Cycle (single cycle operation, machine cycle)
Computer system's own basic operation is very simple.
It can repeat the basic operations billions of times per seconds.
Steps:
1. Fetch the instructions.
2. Decode the instruction and read registers.
3. Perform an ALU operation.
4. Read/write memory data if the instruction involves a memory operand.
5. Write the result into the destination register, if needed.
Comments
Post a Comment