CSC 303
CSC 303
Computer Architecture deals with giving operational attributes of the computer or Processor
to be specific. It deals with details like physical memory, ISA (Instruction Set Architecture) of
the processor, the number of bits used to represent the data types, Input Output mechanism
and technique for addressing memories.
Computer Organization:
Computer Organization is realization of what is specified by the computer architecture. It deals
with how operational attributes are linked together to meet the requirements specified by
computer architecture. Some organizational attributes are hardware details, control signals,
peripherals.
EXAMPLE:
Say you are in a company that manufactures cars, design and all low-level details of the car
come under computer architecture (abstract, programmers view), while making it’s parts
piece by piece and connecting together the different components of that car by keeping the
basic design in mind comes under computer organization (physical and visible).
Computer Architecture
Computer Organization
First Generation
1
The period of first generation: 1946-1959. Vacuum tube based.
Second Generation
2
The period of second generation: 1959-1965. Transistor based.
Third Generation
3
The period of third generation: 1965-1971. Integrated Circuit based.
Fourth Generation
4
The period of fourth generation: 1971-1980. VLSI microprocessor based.
Fifth Generation
5
The period of fifth generation: 1980-onwards. ULSI microprocessor based
First generation
The period of first generation was 1946-1959. The computers of first generation used vacuum
tubes as the basic components for memory and circuitry for CPU (Central Processing Unit). These
tubes, like electric bulbs, produced a lot of heat and were prone to frequent fusing of the
installations, therefore, were very expensive and could be afforded only by very large
organizations. In this generation mainly batch processing operating system were used. Punched
cards, paper tape, and magnetic tape were used as input and output devices. The computers in this
generation used machine code as programming language.
Some computers of this generation were: ENIAC, EDVAC, UNIVAC, IBM-701, IBM-650
Second generation
The period of second generation was 1959-1965. In this generation transistors were used
that were cheaper, consumed less power, more compact in size, more reliable and faster
than the first generation machines made of vacuum tubes. In this generation, magnetic cores
were used as primary memory and magnetic tape and magnetic disks as secondary storage
devices. In this generation assembly language and high-level programming languages like
FORTRAN, COBOL were used. The computers used batch processing and multiprogramming
operating system.
The period of third generation was 1965-1971. The computers of third generation used integrated
circuits (IC's) in place of transistors. A single IC has many transistors, resistors and capacitors
along with the associated circuitry. The IC was invented by Jack Kilby. This development made
computers smaller in size, reliable and efficient. In this generation remote processing, time-
sharing, multi-programming operating system were used. High- level languages (FORTRAN-II
TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-68 etc.) were used during this generation.
The period of fourth generation was 1971-1980. The computers of fourth generation used Very
Large Scale Integrated (VLSI) circuits. VLSI circuits having about 5000 transistors and other
circuit elements and their associated circuits on a single chip made it possible to have
microcomputers of fourth generation. Fourth generation computers became more powerful,
compact, reliable, and affordable. As a result, it gave rise to personal computer (PC) revolution.
In this generation time sharing, real time, networks, distributed operating system were used. All
the high-level languages like C, C++, DBASE etc., were used in this generation.
The period of fifth generation is 1980-till date. In the fifth generation, the VLSI technology
became ULSI (Ultra Large Scale Integration) technology, resulting in the production of
microprocessor chips having ten million electronic components. This generation is based on
parallel processing hardware and AI (Artificial Intelligence) software. AI is an emerging branch
in computer science, which interprets means and method of making computers think like human
beings. All the high-level languages like C and C++, Java, .Net etc., are used in this generation.
AI includes:
• Robotics
• Neural Networks
• Game Playing
• Development of expert systems to make decisions in real life situations.
• Natural language understanding and generation.
Analog Computers: An analog computer is a form of computer that uses the continuously
changeable aspects of physical phenomena such as electrical, mechanical, or hydraulic quantities
to model the problem being solved. In contrast, digital computers represent varying quantities
symbolically, as their numerical values change.
Hybrid Computers: - are computers that exhibit features of analog computers and digital
computers. The digital component normally serves as the controller and provides logical operations,
while the analog component normally serves as a solver of differential equations.
Classification digital Computer based on size and Capability
Based on size and capability, computers are broadly classified into
Laptop: - this computer is similar to a desktop computers but the size is smaller. They are
expensive than desktop. The weight of laptop is around 3 to 5 kg.
Notebook: - These computers are as powerful as desktop but size of these computers are
comparatively smaller than laptop and desktop. They weigh 2 to 3 kg. They are more costly than
laptop.
Palmtop (Hand held): - They are also called as personal Digital Assistant (PDA). These
computers are small in size. They can be held in hands. It is capable of doing word processing,
spreadsheets and hand writing recognition, game playing, faxing and paging. These
computers are not as powerful as desktop computers. Ex: - 3com palmV.
Wearable computer: - The size of this computer is very small so that it can be worn on the
body. It has smaller processing power. It is used in the field of medicine. For example, pace
maker to correct the heart beats. Insulin meter to find the levels of insulin in the blood.
a) Workstations:- It is used in large, high-resolution graphics screen built in network support,
Engineering applications(CAD/CAM), software development desktop publishing
Now we will be discussing the general system architecture. Let’s have a recap of the meanings of
computer architecture and organisation
In general terms, the architecture of a computer system can be considered as a catalogue of tools or
attributes that are visible to the user such as instruction sets, number of bits used for data, addressing
techniques, etc.
Whereas, Organization of a computer system defines the way system is structured so that all those
catalogued tools can be used. The significant components of Computer organization are ALU, CPU,
memory and memory organization.
The operations performed on the data in the processor constitute a data stream.
Parallel processing may occur in the instruction stream, in the data stream, or both.
Flynn's classification divides computers into four major groups that are:
1. Single instruction stream, single data stream (SISD)
2. Single instruction stream, multiple data stream (SIMD)
3. Multiple instruction stream, single data stream (MISD)
4. Multiple instruction stream, multiple data stream (MIMD)
SISD
SISD stands for 'Single Instruction and Single Data Stream'. It represents the organization of a single
computer containing a control unit, a processor unit, and a memory unit. Instructions are executed
sequentially, and the system may or may not have internal parallel processing capabilities.
Most conventional computers have SISD architecture like the traditional Von-Neumann computers.
Parallel processing, in this case, may be achieved by means of multiple functional units or by pipeline
processing.
Where, CU = Control Unit, PE = Processing Element, M = Memory
Instructions are decoded by the Control Unit and then the Control Unit sends the instructions to the
processing units for execution. Data Stream flows between the processors and memory bi-directionally.
SIMD
SIMD stands for 'Single Instruction and Multiple Data Stream'. It represents an organization that
includes many processing units under the supervision of a common control unit.
All processors receive the same instruction from the control unit but operate on different items of data.
The shared memory unit must contain multiple modules so that it can communicate with all the
processors simultaneously.
SIMD is mainly dedicated to array processing machines. However, vector processors can also be seen
as a part of this group.
MISD
MISD stands for 'Multiple Instruction and Single Data stream'.
MISD structure is only of theoretical interest since no practical system has been constructed using this
organization.
In MISD, multiple processing units operate on one single-data stream. Each processing unit operates on
the data independently via separate instruction stream.
MIMD
MIMD stands for 'Multiple Instruction and Multiple Data Stream'.
In this organization, all processors in a parallel computer can execute different instructions and operate
on various data at the same time.
In MIMD, each processor has a separate program and an instruction stream is generated from each
program.
The term Stored Program Control Concept refers to the storage of instructions in computer memory
to enable it to perform a variety of tasks in sequence or intermittently. The idea was introduced in the
late 1040s by John von Neumann.
ENIAC (Electronic Numerical Integrator and Computer) was the first computing system designed
in the early 1940s. It was based on Stored Program Concept in which machine use memory for processing
data.
Von-Neumann Model
Von-Neumann proposed his computer architecture design in 1945 which was later known as Von-
Neumann Architecture. It consisted of a Control Unit, Arithmetic, and Logical Memory Unit (ALU),
Registers and Inputs/Outputs.
Von Neumann architecture is based on the stored-program computer concept, where instruction data and
program data are stored in the same memory. This design is still used in most computers produced today.
The Central Processing Unit can also be defined as an electric circuit responsible for executing the
instructions of a computer program. The CPU performs a variety of functions dictated by the type of
instructions that are incorporated in the computer.
Control Unit: The Control Unit of a computer system controls the operations of components like ALU,
memory and input/output devices.
The Control Unit consists of a program counter that contains the address of the instructions to be fetched
and an instruction register into which instructions are fetched from memory for execution.
Registers: Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are
fetched from the registers.
Following is the list of registers that plays a crucial role in data processing.
Registers Description
MAR (Memory Address This register holds the memory location of the data that needs to be
Register) accessed.
MDR (Memory Data Register) This register holds the data that is being transferred to or from
memory.
AC (Accumulator) This register holds the intermediate arithmetic and logic results.
PC (Program Counter) This register contains the address of the next instruction to be
executed.
CIR (Current Instruction This register contains the current instruction during processing.
Register)
Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to transfer
information in and out of the storage. The memory stores binary information in groups of bits called
words. The internal structure of a memory unit is specified by the number of words it contains and the
number of bits in each word.
Buses
Buses are the means by which information is shared between the registers in a multiple-register
configuration system.
A bus structure consists of a set of common lines, one for each bit of a register, through which binary
information is transferred one at a time. Control signals determine which register is selected by the bus
during each particular register transfer.
Von-Neumann Architecture comprised of three major bus systems for data transfer.
Bus Description
Address Address Bus carries the address of data (but not the data) between the processor and the
Bus memory.
Data Bus Data Bus carries data between the processor, the memory unit and the input/output
devices.
Data Representation
Registers are made up of flip-flops and flip-flops are two-state devices that can store only 1’s
and 0’s.
There are many methods or techniques which can be used to convert numbers from one
base to another. We'll demonstrate here the following −
• Decimal to Other Base System
• Other Base System to Decimal
• Other Base System to Non-Decimal
• Shortcut method − Binary to Octal
• Shortcut method − Octal to Binary
• Shortcut method − Binary to Hexadecimal
• Shortcut method − Hexadecimal to Binary
Decimal toOther Base System
Steps
• Step 1 − Divide the decimal number to be converted by the value of the new base.
• Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant digit)
of new base number.
• Step 3 − Divide the quotient of the previous divide by the new base.
• Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the new
base number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero
in Step 3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base
number.
Example −
Decimal Number: 2910
Calculating Binary Equivalent
Step 1 29 / 2 14 1
Step 2 14 / 2 7 0
Step 3 7/2 3 1
Step 4 3/2 1 1
Step 5 1/2 0 1
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so
that the first remainder becomes the Least Significant Digit (LSD) and the last remainder
becomes the Most Significant Digit (MSD).
Decimal Number − 2910 = Binary Number − 111012.
Other Base Systemto Decimal System
Steps
• Step 1 − Determine the column (positional) value of each digit (this depends on the
position of the digit and the base of the number system).
• Step 2 − Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.
• Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in
decimal.
Example
Binary Number − 111012
Calculating Decimal Equivalent −
Binary Number − 111012 = Decimal Number − 2910
Other Base System to Non-Decimal System
Steps
• Step 1 − Convert the original number to a decimal number (base 10).
• Step 2 − Convert the decimal number so obtained to the new base number.
Example
Octal Number − 258
Calculating Binary Equivalent −
Step 1 − Convert to Decimal
Step 1 21 / 2 10 1
Step 2 10 / 2 5 0
Step 3 5/2 2 1
Step 4 2/2 1 0
Step 5 1/2 0 1
Step 2 101012 28 58
Example
Binary Number − 101012
Calculating hexadecimal Equivalent −
Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But this
is not enough for communication between two computers because there we need many more
symbols for communication. These symbols are required to represent 26 alphabets with
capital and small letters, numbers from 0 to 9, punctuation marks and other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic
characters. Mostly such codes also represent other characters such as symbol and various
instructions necessary for conveying information. An alphanumeric code should at least
represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following three
alphanumeric codes are very commonly used for the data representation.
• American Standard Code for Information Interchange (ASCII).
• Extended Binary Coded Decimal Interchange Code (EBCDIC).
• Five bit Baudot Code.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly
used worldwide while EBCDIC is used primarily in large IBM computers.
Complement Arithmetic
Complements are used in the digital computers in order to simplify the subtraction operation
and for the logical manipulations. For each radix-r system (radix r represents base of number
system) there are two types of complements.
1'scomplement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is
called as taking complement or 1's complement. Example of 1's Complement is as follows.
2'scomplement
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit
(LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.
Binary Arithmetic
Binary arithmetic is essential part of all the digital computers and many other digital systems.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary
addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given
column and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary
subtraction. There are four rules of binary subtraction.
Example − Subtraction
Binary Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal
multiplication because only 0s and 1s are involved. There are four rules of binary
multiplication.
Example − Multiplication
Binary Division
Binary division is similar to decimal division. It is called as the long division
“OFF” and “ON” for the two inputs. However, when dealing with Boolean
expressions and especially logic gate truth tables, we do not general use “ON”
or “OFF” but instead give them bit values which represent a logic level “1” or a
logic level “0” respectively.
Then the four possible combinations of A and B for a 2-input logic gate is given
as:
• Input Combination 1. – “OFF” – “OFF” or ( 0, 0 )
• Input Combination 2. – “OFF” – “ON” or ( 0, 1 )
• Input Combination 3. – “ON” – “OFF” or ( 1, 0 )
• Input Combination 4. – “ON” – “ON” or ( 1, 1 )
Therefore, a 3-input logic circuit would have 8 possible input combinations or
2 and a 4-input logic circuit would have 16 or 2 , and so on as the number of
3 4
inputs increases. Then a logic circuit with “n” number of inputs would
have 2 possible input combinations of both “OFF” and “ON”.
n
Boolean Algebra Truth Tables For A 2-input AND Gate
For a 2-input AND gate, the output Q is true if BOTH input A “AND”
input B are both true, giving the Boolean Expression of: ( Q = A and B ).
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
Note that the Boolean Expression for a two input AND gate can be written
as: A.B or just simply AB without the decimal point.
Boolean Algebra Truth Tables For A 2-input OR Gate
For a 2-input OR (Inclusive-OR) gate, the output Q is true if EITHER
input A “OR” input B is true, giving the Boolean Expression of: (Q = A or B).
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
Here the two switches, A and B are connected together to form a series circuit.
Therefore, in the circuit above, both switch A AND switch B must be closed
(Logic “1”) in order to put the lamp on. In other words, both switches must be
closed, or at logic “1” for the lamp to be “ON”.
In Boolean Algebra terms the output will be TRUE only when all of its inputs
are TRUE. In electrical terms, the logic AND function is equal to a series circuit
as shown above.
Here the two switches A and B are connected in parallel and either
Switch A OR Switch B can be closed in order to put the lamp on. In other
words, either switch can be closed, or at logic “1” for the lamp to be “ON”.
Boolean Algebra terms the output will be TRUE when any of its inputs
are TRUE. In electrical terms, the logic OR function is equal to a parallel
circuit.
Boolean Algebra Truth Tables For The NOT Gate
For a single input NOT (Inverter) gate, the output Q is ONLY true when the
input is “NOT” true, the output is the inverse or complement of the input giving
the Boolean Expression of: ( Q = NOT A ).
The NAND and the NOR Gates are a combination of the AND and OR Gates
respectively with that of a NOT Gate (inverter).
2-input logic gate truth tables are given here as examples of the operation of
each logic function, but there are many more logic gates with 3, 4 even 8
individual inputs. The multiple input gates are no different to the simple 2-input
gates above, So a 4-input AND gate would still require ALL 4-inputs to be
present to produce the required output at Q and its larger truth table would
reflect that.
Boolean Algebra Examples
Construct a Truth Table for the logical functions below
1.
2.
3.