Coa Unit 2
Coa Unit 2
COMPUTER ORGANIZATION
AND ARCHITECTURE
UNIT-2
Topic : Basic Structure of a
Computer
01-08-2023 21CSS201T - Computer Organization and Architecture 1
Basic Structure of Computers
Computer Architecture in general covers three aspects of computer design namely: Computer
Hardware, Instruction set Architecture and Computer Organization.
Computer hardware consists of electronic circuits, displays, magnetic and optical storage
media and communication facilities.
Instruction set Architecture is programmer visible machine interface such as instruction set,
registers, memory organization and exception handling. Two main approaches are mainly
CISC (Complex Instruction Set Computer) and RISC (Reduced Instruction Set Computer)
Computer Organization includes the high level aspects of a design, such as memory system,
the bus structure and the design of the internal CPU.
Laptop Computer: A portable, compact computer that can run on power supply or a
battery unit. All components are integrated as one compact unit. It is generally more
expensive than a comparable desktop. It is also called a Notebook.
Work Station: Powerful desktop computer designed for specialized tasks. Generally used
for tasks that requires a lot of processing speed. Can also be an ordinary personal computer
attached to a LAN (local area network).
Main Frame: Large expensive computer capable of simultaneously processing data for hundreds or
thousands of users. Used to store, manage, and process large amounts of data that need to be reliable,
secure, and centralized.
Hand Held: It is also called a PDA (Personal Digital Assistant). A computer that fits into a pocket,
runs on batteries, and is used while holding the unit in your hand. Typically used as an appointment
book, address book, calculator and notepad.
Multi Core: Have Multiple Cores – parallel computing platforms. Many Cores or computing
elements in a single chip. Typical Examples: Sony Play station, Core 2 Duo, i3, i7 etc.
01-08-2023 21CSS201T - Computer Organization and Architecture 6
01-08-2023 21CSS201T - Computer Organization and Architecture 7
FUNCTIONAL UNITS OF COMPUTER
• Input Unit
• Output Unit
• Central processing Unit (ALU and Control Units)
• Memory
• Bus Structure
R2
Add R1, R2
T1 Enable R1
T2 Enable R2
W/R
CS RD 0 1 1
A0 PROCESSOR
A1 1 0 0
A2
1 0 1
ADDRESS BUS
1 1 0
D7 D0
D0 D7
1 1 1
DATA BUS
store 1 bit.
•
Data is usually accessed in n-bit •
•
groups. n is called word length. i th word
•Data is transferred to and from memory in groups of bits called words. A word can be a
group of 8 bits, 16 bits, 32 bits or 64 bits (and growing).
•If the word is 8 bits, it is referred to as a byte. The term “byte” is so common in computer
science that sometimes a 16-bit word is referred to as a 2-byte word, or a 32-bit word is
referred to as a 4-byte word.
•The total number of uniquely identifiable locations in memory is called the address
space.
•For example, a memory with 64 kilobytes (16 address line required) and a word size of 1
byte has an address space that ranges from 0 to 65,535.
A computer has 32 MB (megabytes) of memory. How many bits are needed to address any
single byte in memory?
Solution
The memory address space is 32 MB, or 225 (25 × 220). This means that we need log2 225, or 25
bits, to address each byte.
Example 2
A computer has 128 MB of memory. Each word in this computer is eight bytes. How many bits
are needed to address any single word in memory?
Solution
The memory address space is 128 MB, which means 227. However, each word is eight (23)
bytes, which means that we have 224 words. This means that we need log2 224, or 24 bits, to
address each word.
01-08-2023 21CSS201T - Computer Organization and Architecture 48
MEMORY OPERATIONS
• Today, general-purpose computers use a set of instructions called a program to
process data.
• A computer executes the program to create output data from input data
W ord
address Byte address Byte address
0 0 1 2 3 0 3 2 1 0
4 4 5 6 7 4 7 6 5 4
• •
• •
• •
k k k k k k k k k k
2 - 4 2 - 4 2 - 3 2 - 2 2 - 1 2 - 4 2 - 1 2 - 2 2 - 3 2 - 4
01-08-2023
(a) Big-endian assignment 21CSS201T - Computer Organization and Architecture
(b) Little-endian assignment 54
Byte and word addressing.
• In case of 16 bit data, aligned words begin at byte addresses of
0,2,4,………………………….
• In case of 32 bit data, aligned words begin at byte address of
0,4,8,………………………….
• In case of 64 bit data, aligned words begin at byte addresses of
0,8,16,………………………..
• In some cases words can start at an arbitrary byte address also then, we say
that word locations are unaligned
• R2 [LOCN]
• R4 [R3] +[R2]
• Memory cell pointed to by address field contains the address of (pointer to) the
operand
Two references to memory are required to fetch the operand.
• Effective Address = [A]
• Look in A, find address (A) and look there for operand
• e.g. ADD (A)
• Add contents of cell pointed to by contents of A to the accumulator
Address bus
ALU Register Section
Data bus
Control bus
• 16-bit register
• contains 9 flags
• remaining 7 bits are idle in this register
• These flags tell about the status of the processor after any arithmetic or logical
operation
• IF the flag value is 1, the flag is set, and if it is 0, it is said to be reset.