6th sem unit 1
6th sem unit 1
The basic organization of a computer includes the processing unit, memory unit, and
input-output devices. The processing unit controls the computer's functions, while the
memory unit stores data and instructions. Input devices allow users to send messages to
the computer, and output devices allow users to get output from the computer.
Key components of a computer
• Central Processing Unit (CPU): The brain of the computer that performs computing
instructions
• Memory Unit: Stores data and instructions for processing
• Input Unit: Accepts data and instructions from outside
• Output Unit: Sends the processed data to the outside world
• Control Unit: Manages and directs the operations of the system
• Arithmetic Logic Unit (ALU): Performs calculations and logical operations
Computer organization and architecture
Computer organization and architecture is the study of how these components interact to
execute instructions and perform tasks. It's a foundational area in computer science and
engineering.
Digital Computers.
A digital computer is a machine that processes data and performs calculations using
binary code (0s and 1s). Digital computers can store large amounts of data and perform
complex tasks at high speeds.
How digital computers work
• Input: Information is entered into the computer through keyboards, optical readers, and
other devices.
• Storage: Instructions and data are stored in memory units.
• Calculation: The computer manipulates data based on instructions in its memory.
• Control: The computer calls up programs and data from storage in the correct order.
• Output: The computer presents results through displays, printers, and other devices.
History
John Vincent Atanasoff is credited with inventing the first electronic digital computer in the
1930s.
Von Neumann Computer.
A Von Neumann computer is a computer system that follows the Von Neumann
architecture. This architecture is the basis for many modern computers, including laptops
and desktops.
The architecture was described in 1945 by mathematician and physicist John von
Neumann. The first electronic computer to use this architecture was the IAS machine, built
at the Institute for Advanced Study in Princeton, New Jersey.
Uses
The Von Neumann architecture is used in many types of computers,
including: Microcontrollers, Embedded systems, and High-performance computing
clusters.
The basic organization of a computer includes the central processing unit (CPU), memory
unit, and input-output devices.
Central Processing Unit (CPU)
• The CPU is the brain of the computer. It controls all the functions of the computer.
• The CPU performs basic arithmetic, logical, and input/output operations.
• The CPU reads instructions from memory and directs the flow of data between different
components.
Memory Unit
• The memory unit is a small storage device that holds a memory for a computer.
• The memory unit consists of two units: an arithmetic unit and a logic unit.
Input-Output Devices
• Input devices are those devices through which end-users can send messages to
computers. Examples include keyboard and mouse.
• Output devices are those devices through which end-users get output from
computers. Examples include monitors.
Other components Control Unit (CU), Arithmetic Logic Unit (ALU), and Registers.
Computer hardware consists of electronic circuits, displays, magnetic and optical storage
media and communication facilities.
Computer Generations.
First Generation
• The period 1940 to 1956, roughly considered as the First Generation of Computer.
• The first generation computers were developed by using vacuum tube or thermionic valve
machine.
• The input of this system was based on punched cards and paper tape; however, the output
was displayed on printouts.
• The first generation computers worked on binary-coded concept (i.e., language of 0-
1). Examples: ENIAC, EDVAC, etc.
Second Generation
• The period 1956 to 1963 is roughly considered as the period of Second Generation of
Computers.
• The second generation computers were developed by using transistor technology.
• In comparison to the first generation, the size of second generation was smaller.
• In comparison to computers of the first generation, the computing time taken by the
computers of the second generation was lesser.
Third Generation
• The period 1963 to 1971 is roughly considered as the period of Third Generation of computers.
• The third generation computers were developed by using the Integrated Circuit (IC)
technology.
• In comparison to the computers of the second generation, the size of the computers of the
third generation was smaller.
• In comparison to the computers of the second generation, the computing time taken by the
computers of the third generation was lesser.
• The third generation computer consumed less power and also generated less heat.
• The maintenance cost of the computers in the third generation was also low.
• The computer system of the computers of the third generation was easier for commercial use.
Fourth Generation
• The period 1972 to 2010 is roughly considered as the fourth generation of computers.
• The fourth generation computers were developed by using microprocessor technology.
• By coming to fourth generation, computer became very small in size, it became portable.
• The machine of fourth generation started generating very low amount of heat.
• It is much faster and accuracy became more reliable.
• The production cost reduced to very low in comparison to the previous generation.
• It became available for the common people as well.
Fifth Generation
• The period 2010 to till date and beyond, roughly considered as the period of fifth generation
of computers.
• By the time, the computer generation was being categorized on the basis of hardware only,
but the fifth generation technology also included software.
• The computers of the fifth generation had high capability and large memory capacity.
• Working with computers of this generation was fast and multiple tasks could be performed
simultaneously.
• Some of the popular advanced technologies of the fifth generation include Artificial
intelligence, Quantum computation, Nanotechnology, Parallel processing, etc.
Instruction Codes.
• A computer instruction is a binary code that determines the micro-operations in a sequence for
a computer. They are saved in the memory along with the information. Each computer has its
specific group of instructions.
• They can be categorized into two elements as Operation codes (Opcodes) and Address.
Opcodes specify the operation for specific instructions. An address determines the registers
or the areas that can be used for that operation. Operands are definite elements of computer
instruction that show what information is to be operated on.
Computer registers.
Computer registers are temporary storage locations for data and instructions that the CPU
is currently processing. They are a vital part of a computer's architecture and help the
CPU perform tasks quickly and efficiently.
Types of computer registers:
• Accumulator: Stores the results of arithmetic and logic operations
• Address register: Stores the memory location's address to be accessed for data
• General purpose registers: Store data temporarily during calculations and are essential
for executing arithmetic operations
• Memory data register (MDR): Stores data being transferred to and from the immediate
access storage
• Index register: Modifies operand addresses during the run of a program, typically for
doing vector/array operations
• Control registers: Change or control the general behavior of a CPU or other digital
device
How registers work
Registers enable quick access to data for arithmetic and logic operations. They also store
memory addresses, program counters, and other control information necessary for
program execution.
Computer instructions.
A computer instruction refers to a binary code that controls how a computer performs
micro-operations in a series. They, together with the information, are saved in the
memory. Every computer has its own set of instructions. Operation codes or Opcodes and
Addresses are the two elements that they are divided into.
ADD X, Y, Z
Here, X, Y, and Z seem to be the three variables that are each assigned to a distinct
memory location. The operation implemented on operands is ‘ADD.’ The source operands
are ‘X’ and ‘Y,’ while the destination operand is ‘Z.’
In order to determine the three operands, bits are required. To determine one operand, n
bits are required (one memory address). In the same way, 3n bits are required to define
three operands (or three memory addresses). To identify the ADD operation, bits are also
required.
ADD X, Y
Here X and Y are the two variables that have been assigned to a specific memory
address. The operation performed on the operands is ‘ADD.’ This command combines the
contents of variables X and Y and stores the result in variable Y. The source operand is
‘A,’ while ‘B’ is used as both a source and a destination operand.
The two operands must be determined using bits. To define one operand, n bits are
required (one memory address). To determine two operands, 2n bits are required (two
memory addresses). The ADD operation also necessitates the use of bits.
operation source
INCLUDE X
Here X refers to the variable that has access to a specific memory region. The operation
performed on operand A is ‘ADD.’ This instruction adds the value of variable A to the
accumulator and then saves the result inside the accumulator by restoring the
accumulator’s contents.
Fetch stage
• During the fetch stage of the cycle, the program counter holds the address of the next
instruction to be fetched from memory
• The address of the next instruction or data to be fetched is copied into the memory
address register (MAR)
• The address of the instruction or data is then sent along the address bus and awaits a
signal from the control bus
• The signal sent along the control bus is sent from the control unit (CU) to the main memory
• The data or instructions received from main memory is fetched to the memory data
register (MDR) via the data bus
• A copy of the instruction or data is stored in the current instruction register (CIR)
• The program counter (PC) increments by 1 so it is pointing to the next instruction to be
executed
Decode stage
• During the decode stage of the cycle, the CPU needs to work out what is required from the
instruction
• This is done as the instruction is split into two parts:
o Opcode - what the instruction is
o Operand - what to do it to
▪ This could be either data or an address where the data is stored
Execute stage
• During the execute stage of the cycle, the CPU will carry out the instruction that was
fetched
• Some examples that would take place at this stage are
o Performing a calculation
o Storing a result or data back in main memory (RAM)
o Going to main memory to fetch data from a different location
Common Bus System.
A pair of signal lines that facilitate the transfer of multi-bit data from one system to another
is known as a bus.
The diagram demonstrates three master devices as M3, M6, and M4.
The master device start and controls the connection. S7, S5, and S2 are slave devices. Slave
devices counter to the commands provided by master devices. If M3 needs to offer a command
to S5, it should transfer its instruction by the bus.
Therefore, the S5 holds the instruction and takes a response to the instruction by the bus.
A basic computer includes eight registers, a memory unit, and a control unit. These units
require to connect frequently. A bus supports the medium through which communication can
take place.
There are multiple registers and their functions which are as follows −
• Load (LD) − During the next clock pulse transition the information from the bus is transmitted
to the register whose load (LD) input is enabled.
• Memory Unit − When the write input of the memory is activated, it holds the content of the bus.
When the read input is activated, the memory places the 16-bit output onto the bus with the
selection variables being S2S1 S0 = 111..
• Increment (INR) and Clear (CLR) − When the INR signal is enabled, the contents of the specified
register are incremented. The contents are cleared when the CLR signal is enabled.
• Address Registers (AR) − The address of the memory for the next read and write operation is
determined. It receives or sends an address from or to the bus when selection inputs
S2S1 S0=001 is used and the load is enabled. With inputs INR and CLR, the address gets
incremented or cleared.
• Program Counter (PC) − The address of the next instruction that is to be read from the memory
is saved. It receives or sends an address from or to the bus when selection inputs S2S1 S0 =
010is applied and the load input is enabled. With inputs INR and CLR, the address gets
incremented or cleared.
• Data Register (DR) − The data register includes the data to be written into memory or data that
is to be read from the memory. It receives or sends an address from or to the bus when
selection inputs are S2S1 S0 = 011 applied and the load input is enabled. With inputs INR and
CLR, the address gets incremented or cleared.
• Accumulator (AC) − Accumulators are beneficial in executing the register micro-operations
including complement, shift, etc. The results acquired are again sent to the accumulator. An
accumulator stores the intermediate arithmetic and logic results.
• Instruction Registers (IR) − The IR stores the copy of the instruction that the processor has to
implement. The instruction that is read from the memory is stored in the IR. It receives or
sends instruction code from or to the bus when selection inputs S2S1 S0 = 111 are applied
and the load input is enabled.
• Temporary Register (TR) − The temporary storage for variables or results is supported by the
temporary register. It receives or sends the temporary data from or to the bus when selection
inputs S2S1 S0 = 011 are applied and the load input is enabled. With inputs INR and CLR, the
address gets incremented or cleared.
• Input Registers (INPR) − It includes 8 bits to hold the alphanumeric input information. Input
device shifts its serial data into the 8-bit register. The data is moved to AC via the adder/logic
circuit with load enabled.
• Output Registers (OUTPR) − The data is received from AC and moved to the output device.
• Data
• Address
• Control lines
Data lines provide a path for moving data among system modules. These lines,
collectively, are called the data bus. The data bus may consist of 32, 64, 128, or
even more separate lines, the number of lines being referred to as the width of the
data bus.
Address lines are used to designate the source or destination of the data on the
data bus. For example, if the processor wishes to read a word (8, 16, or 32 bits) of
data from memory, it puts the address of the desired word on the address lines.
Clearly, the width of the address bus determines the maximum possible memory
capacity of the system.
The control lines
Control lines are used to control the access to the data and address lines. Because
the data and address lines are shared by all components, there must be a means of
controlling their use.
The operation of the bus is as follows. If one module wishes to send data to
another, it must
2. Transfer a request to the other module over the appropriate control and
address lines