0% found this document useful (0 votes)
10 views15 pages

Chapter 1

The document provides a comprehensive overview of computer architecture, focusing on primary and secondary storage, CPU structure, instruction set architecture, and memory hierarchy. It explains key concepts such as volatile vs. non-volatile memory, the role of the CPU, and the differences between combinational and sequential circuits. Additionally, it includes multiple-choice questions with explanations to reinforce understanding of the material.

Uploaded by

tommyassefa95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

Chapter 1

The document provides a comprehensive overview of computer architecture, focusing on primary and secondary storage, CPU structure, instruction set architecture, and memory hierarchy. It explains key concepts such as volatile vs. non-volatile memory, the role of the CPU, and the differences between combinational and sequential circuits. Additionally, it includes multiple-choice questions with explanations to reinforce understanding of the material.

Uploaded by

tommyassefa95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter 1

I. Primary Storage (Main Memory)

 Definition: The primary storage, also known as main memory or RAM


(Random Access Memory), is the computer's short-term, volatile memory. It
holds the data and instructions that the CPU is currently using.
 Key Characteristics:
o Volatile: Data is lost when power is turned off.
o Fast Access: Much faster access speeds compared to secondary
storage.
o Limited Capacity: Typically smaller in capacity than secondary
storage.
o Directly Accessible by CPU: The CPU can directly read from and
write to primary storage.
 Types of RAM:
o DRAM (Dynamic RAM): The most common type of RAM. Requires
periodic refreshing to maintain data.
 SDRAM (Synchronous DRAM): Synchronized with the
system clock for faster operation.
 DDR SDRAM (Double Data Rate SDRAM): Transfers data
on both the rising and falling edges of the clock signal,
effectively doubling the data transfer rate. (DDR2, DDR3,
DDR4, DDR5 are further evolutions).
o SRAM (Static RAM): Faster and more expensive than DRAM. Does
not require refreshing. Used for caches.
 Purpose: Provides fast access to the data and instructions that the CPU
needs to execute programs efficiently. It serves as the workspace for the
CPU.

II. Secondary Storage

 Definition: Secondary storage is non-volatile memory that provides long-


term storage for data, programs, and operating systems.
 Key Characteristics:
o Non-Volatile: Data is retained even when power is turned off.
o Slower Access: Slower access speeds compared to primary storage.
o Large Capacity: Typically much larger in capacity than primary
storage.
o Indirectly Accessible by CPU: The CPU usually needs to transfer
data from secondary storage to primary storage before it can be
processed.
 Types of Secondary Storage:
o Hard Disk Drives (HDDs): Use magnetic platters to store data.
Relatively inexpensive and offer high capacity but have slower access
times.
o Solid State Drives (SSDs): Use flash memory to store data. Faster
access times, lower power consumption, and more durable than
HDDs, but generally more expensive per unit of storage.
o USB Flash Drives: Portable storage devices using flash memory.
o Optical Discs (CDs, DVDs, Blu-ray Discs): Use lasers to read and
write data on optical media. Less common now due to the rise of flash
storage and cloud storage.
o Magnetic Tape: Used for archival storage. Very high capacity and
low cost but extremely slow access times (sequential access).
 Purpose: To provide persistent storage for data, applications, and operating
systems, ensuring that data is not lost when the computer is turned off.

III. Key Differences Summarized

Feature Primary Storage (RAM) Secondary Storage


Volatility Volatile Non-Volatile
Access Speed Fast Slow
Capacity Limited Large
Direct Access Yes No (typically)
Cost High Low
Purpose Active data & code Long-term storage
Example DDR4 RAM SSD, HDD, USB drive

IV. Memory Hierarchy

 Primary and Secondary storage are part of a memory hierarchy.


 CPU -> Registers -> Cache(SRAM) -> Main Memory (DRAM) ->
SSD/HDD
 Faster Memory is generally more expensive, so system use a small amount
of fast memory and use slower bigger memory to store everything.
I. Fundamentals

 Computer Architecture: High-level design. Focuses on what the system


does. Includes ISA, memory models, I/O strategies. Defines the attributes
visible to the programmer.
 Computer Organization: How the architecture is implemented. Focuses on
how the system does it. Includes control signals, interfaces, memory
technology. Deals with the physical units and their interconnections.

II. Instruction Set Architecture (ISA)

 Definition: The interface between hardware and software. Defines the


instructions the CPU can execute, the data types it supports, the addressing
modes, and the register set.
 Key Components:
o Instruction Format: Structure and encoding of instructions.
o Addressing Modes: How operands are specified (direct, indirect,
register, etc.).
o Data Types: Integers, floating-point numbers, characters, etc.
o Registers: Small, fast storage locations within the CPU.

III. CPU Structure and Function

 Control Unit (CU): Fetches instructions, decodes them, and generates


control signals to coordinate other components.
 Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations
on data.
 Registers:
o Program Counter (PC): Points to the next instruction to be executed.
o Instruction Register (IR): Holds the current instruction being
executed.
o General-Purpose Registers: Used for storing data and addresses.

IV. Memory Hierarchy

 Principle: Exploit locality of reference (temporal and spatial) to reduce


average access time.
 Levels (Fastest to Slowest, Most Expensive to Least Expensive):
o Registers
o Cache Memory (L1, L2, L3): Small, fast SRAM.
o Main Memory (RAM): DRAM.
o Secondary Storage (Hard Disk, SSD, etc.): Non-volatile.
 Caching: Copies of frequently used data are stored in faster memory.
 Cache Mapping: Direct mapping, associative mapping, set-associative
mapping.

V. Pipelining and Superscalar Execution

 Pipelining: Overlapping execution stages of multiple instructions to


increase throughput.
 Hazards: Structural, data, and control hazards can cause pipeline stalls.
 Branch Prediction: Techniques to predict the outcome of conditional
branches and reduce pipeline stalls.
 Superscalar: Executing multiple instructions in parallel using multiple
execution units.

VI. Input/Output (I/O)

 I/O Modules: Interface between the CPU and peripheral devices.


 I/O Techniques:
o Programmed I/O: CPU directly controls I/O operations.
o Interrupt-Driven I/O: Peripheral devices signal the CPU when they
need attention.
o Direct Memory Access (DMA): Peripheral devices transfer data
directly to or from memory without CPU intervention.
 Memory-Mapped I/O: I/O devices are treated as memory locations.

VII. Parallel Processing

 Multicore Processors: Multiple CPUs (cores) on a single chip.


 Multiprocessors: Multiple CPUs in a system.
 Flynn's Taxonomy: SISD, SIMD, MISD, MIMD.
 Amdahl's Law: Limits the speedup achievable through parallelization based
on the serial portion of the task.

VIII. Key Architectural Concepts

 Von Neumann Architecture: Single address space for both instructions and
data.
 Harvard Architecture: Separate address spaces for instructions and data
(allows simultaneous access).
 RISC (Reduced Instruction Set Computing): Simplified instruction set,
fixed-length instructions, load/store architecture.
 CISC (Complex Instruction Set Computing): Complex instruction set,
variable-length instructions, memory operands allowed.

IX. Memory Management

 Virtual Memory: Allows programs to access more memory than physically


available by using disk space as an extension of RAM.
 Address Translation: Mapping virtual addresses to physical addresses.

1. Which of the following best describes Computer Architecture?


o (a) The physical components of a computer system.
o (b) How hardware components work and interact.
o (c) How software and hardware standards interact to form a
computing platform.
o (d) The actual development of computer hardware.
Correct Answer: (c)
Explanation: Computer architecture is a specification detailing how a
set of software and hardware technology standards interact to form a
computer system or platform.
2. What is the primary focus of Computer Organization?
o (a) Designing efficient software programs.
o (b) Specifying the instruction set architecture.
o (c) How hardware components work and interact.
o (d) Developing new computer hardware.
Correct Answer: (c)
Explanation: Computer organization focuses on how the various
hardware components of a computer system connect and interact to
realize the architectural specifications.
3. The Instruction Set Architecture (ISA) is primarily concerned with:
o (a) The physical layout of the CPU.
o (b) The detailed implementation of logic gates.
o (c) The abstract model of a computing system seen by a machine
language programmer.
o (d) The size of the computer's cache memory.
Correct Answer: (c)
Explanation: The ISA defines the instruction set, memory addressing
modes, processor registers, and data formats that a programmer uses.
It's the interface between hardware and software.
4. Which of the following is a key element of System Design (a subcategory
of Computer Architecture)?
o (a) The specific opcodes used in the instruction set.
o (b) The size of the L1 cache.
o (c) System interconnects such as computer buses and switches.
o (d) The number of cores in a CPU.
Correct Answer: (c)
Explanation: System Design encompasses all the other hardware
components within a computing system, including system
interconnects, memory controllers, and CPU off-load mechanisms.
5. What is the role of the CPU in a computer system?
o (a) Storing data.
o (b) Managing the computer's external environment.
o (c) Controlling the operation of the computer and performing data
processing functions.
o (d) Providing communication between different hardware
components.
Correct Answer: (c)
Explanation: The CPU is the central processing unit that executes
instructions and performs calculations.
6. What is the function of Main Memory?
o (a) To provide communication between the CPU and peripherals.
o (b) To store data and instructions that the CPU can access directly.
o (c) To manage the computer's input and output devices.
o (d) To provide long-term storage for data.
Correct Answer: (b)
Explanation: Main memory (RAM) is used to store the data and
instructions that the CPU is actively working with, allowing for fast
access.
7. Digital computers use the binary number system because:
o (a) It's easier for humans to understand.
o (b) It requires less power.
o (c) Their internal components (transistors) function in two states
(ON/OFF).
o (d) It allows for faster calculations.
Correct Answer: (c)
Explanation: The binary number system (0 and 1) directly
corresponds to the two states of transistors, the fundamental building
blocks of digital circuits.
8. What is the fundamental building block of digital circuits?
o (a) Transistors
o (b) Logic gates.
o (c) Resistors.
o (d) Capacitors.
Correct Answer: (b)
Explanation: Logic gates are the fundamental building blocks that
perform logical operations on binary inputs. Transistors are used to
build logic gates, but the gates are the fundamental building block
9. What is the purpose of Boolean algebra?
o (a) To design computer hardware.
o (b) To represent and simplify logic circuits.
o (c) To program computers.
o (d) To store data in memory.
Correct Answer: (b)
Explanation: Boolean algebra provides a mathematical way to
analyze, represent, and simplify digital logic circuits.
10.Which logic gate outputs a '1' only when all inputs are '1'?
o (a) OR gate.
o (b) AND gate.
o (c) NOT gate.
o (d) XOR gate.
Correct Answer: (b)
Explanation: The AND gate's truth table shows that its output is '1'
only when all inputs are '1'.
11.Which logic gate outputs a '1' if at least one input is '1'?
o (a) AND gate.
o (b) OR gate.
o (c) NOT gate.
o (d) NAND gate.
Correct Answer: (b)
Explanation: The OR gate produces a '1' output if any of its inputs
are '1'.
12.What is the function of a NOT gate (inverter)?
o (a) It outputs a '1' only when the input is '1'.
o (b) It outputs a '1' only when the input is '0'.
o (c) It inverts the input signal.
o (d) It outputs a '0' regardless of the input.
Correct Answer: (c)
Explanation: A NOT gate simply inverts its input; a '0' becomes a '1',
and a '1' becomes a '0'.
13.What is a NAND gate a combination of?
o (a) OR gate and NOT gate.
o (b) AND gate and NOT gate.
o (c) XOR gate and NOT gate.
o (d) NOR gate and NOT gate.
Correct Answer: (b)
Explanation: A NAND gate is equivalent to an AND gate followed
by a NOT gate (inverter).
14.What is DeMorgan's Theorem used for?
o (a) Simplifying algebraic equations.
o (b) Simplifying Boolean expressions.
o (c) Designing computer hardware.
o (d) Storing data in memory.
Correct Answer: (b)
Explanation: DeMorgan's Theorems are used to transform and
simplify Boolean expressions, often making them easier to implement
with logic gates.
15.What is the primary difference between combinational and sequential
circuits?
o (a) Combinational circuits use fewer logic gates.
o (b) Sequential circuits are faster.
o (c) Combinational circuits' outputs depend only on current inputs,
while sequential circuits use memory and depend on past inputs and
states.
o (d) Sequential circuits use only AND gates, while combinational
circuits use only OR gates.
Correct Answer: (c)
Explanation: This is the fundamental distinction. Combinational
circuits are memoryless, while sequential circuits incorporate memory
elements (flip-flops).
16.Which of the following is an example of a combinational circuit?
o (a) Flip-flop
o (b) Register
o (c) Counter
o (d) Half Adder
Correct Answer: (d)
Explanation: A half adder's output (sum and carry) depends only on
its two inputs (A and B) at that instant. Flip-flops, registers, and
counters are sequential circuits.
17.What is the function of a flip-flop?
o (a) To perform logical operations.
o (b) To store a single bit of data (memory element).
o (c) To perform arithmetic calculations.
o (d) To amplify signals.
Correct Answer: (b)
Explanation: A flip-flop is a basic memory element that can store a
single bit (0 or 1).
18.Which type of flip-flop toggles its state when its input is asserted?
o (a) SR Flip-Flop
o (b) D Flip-Flop
o (c) JK Flip-Flop
o (d) T Flip-Flop
Correct Answer: (d)
Explanation: A T flip-flop changes its output to the opposite state
with each clock pulse when the T input is high.
19.Flip-flops form the foundation for which of the following?
o (a) Logic gates
o (b) Resistors
o (c) Registers and memory units.
o (d) Capacitors
Correct Answer: (c)
Explanation: Flip-flops are the fundamental building blocks for
constructing registers (which store multiple bits) and memory units
(which store large amounts of data).
20.What is the key difference between a Synchronous and Asynchronous
counter?
o (a) Synchronous counter use more flip-flops
o (b) Synchronous counter bits change simultaneously
o (c) Asynchronous counter is used to count only even numbers
o (d) Synchronous counter has faster operation.
Correct Answer: (b)
Explanation: Synchronous counters have all bits changing together
controlled by a common clock, while Asynchronous (Ripple) counters
bits change one after another.

Chapter 2
Okay, here's a deep summary of the document followed by 20 conceptual multiple-choice
questions with explanations:

Deep Summary:

This document serves as an introductory guide to number systems and codes used in computers
and digital electronics. It begins by contrasting the human-centric decimal system with the
computer's binary system. The document details the structure of the decimal system, highlighting
the significance of the Least Significant Digit (LSD) and Most Significant Digit (MSD),
alongside their respective weight positions.

The guide then moves on to binary, hexadecimal, and octal number systems, explaining their
base values (2, 16, and 8 respectively) and how they are used to represent digital information. It
outlines the process of converting between these systems, including step-by-step examples for
converting from binary, hexadecimal, and octal to decimal, and from decimal to binary,
hexadecimal, and octal. It explains the 4-bit groupings in hexadecimal (nibbles) and their
relationship to bytes. It demonstrates how the octal system was employed in older computers
with word sizes divisible by three bits. The conversion of numbers is also described as a means
of representing text in binary code.

Finally, the document introduces alphanumeric coding, specifically Binary-Coded Decimal


(BCD) and ASCII. BCD is presented as a way to represent each decimal digit with a binary code,
offering ease of conversion between machine-readable and human-readable numerals. ASCII is
described as the industry standard for representing alphanumeric data (letters, symbols, and
numbers) for computer input and output.

1. Why is the binary number system fundamental to computers and digital


electronics?
o (a) It's easier for humans to understand and use.
o (b) It uses fewer digits than the decimal system.
o (c) Computers store information as 0s and 1s, representing two
distinct voltage levels.
o (d) It allows for more efficient arithmetic operations.
Correct Answer: (c)
Explanation: Digital devices use the binary system because it directly
maps to the two states (on/off, high voltage/low voltage) of
transistors.
2. In the decimal number 1234, which digit is the Least Significant Digit
(LSD)?
o (a) 1
o (b) 2
o (c) 3
o (d) 4
Correct Answer: (d)
Explanation: The LSD is the rightmost digit, representing the lowest
power of 10.
3. What is the base of the hexadecimal number system?
o (a) 2
o (b) 8
o (c) 10
o (d) 16
Correct Answer: (d)
Explanation: The hexadecimal number system uses 16 digits (0-9
and A-F).
4. What decimal value is represented by the hexadecimal digit 'A'?
o (a) 9
o (b) 10
o (c) 11
o (d) 12
Correct Answer: (b)
Explanation: In hexadecimal, A represents 10, B represents 11, and
so on, up to F which represents 15.
5. What is a 'nibble'?
o (a) A group of 8 bits
o (b) A group of 3 bits.
o (c) A group of 4 bits.
o (d) A group of 16 bits.
Correct Answer: (c)
Explanation: A nibble is a group of 4 bits, commonly used in
hexadecimal representation.
6. Why is hexadecimal often used to represent binary data?
o (a) It's easier for computers to process.
o (b) It's more compact and easier for humans to read and write than
long strings of binary digits.
o (c) It's the native language of computers.
o (d) It allows for faster calculations.
Correct Answer: (b)
Explanation: Hexadecimal provides a more concise and human-
friendly representation of binary data.
7. What is the base of the octal number system?
o (a) 2
o (b) 8
o (c) 10
o (d) 16
Correct Answer: (b)
Explanation: The octal number system uses 8 digits (0-7).
8. Which of the following number systems was used in older computers
that had word sizes divisible by three bits?
o (a) Binary
o (b) Decimal
o (c) Hexadecimal
o (d) Octal
Correct Answer: (d)
Explanation: The octal number system with its base of 8 was used in
older computers.
9. What are the steps to convert from a binary number to its decimal
equivalent?
o (a) Divide the binary number by 2 repeatedly.
o (b) Multiply each binary digit by its corresponding power of 2 and
sum the results.
o (c) Group the binary digits into sets of four.
o (d) Subtract the binary number from 10 repeatedly.
Correct Answer: (b)
Explanation: The value of a binary number is found by multiplying
each bit by 2 raised to the power of its position (starting from 0 on the
right) and adding these products together.
10.When converting a decimal number to binary, which operation is
repeatedly used?
o (a) Multiplication by 2.
o (b) Subtraction by 2.
o (c) Division by 2.
o (d) Addition of 2.
Correct Answer: (c)
Explanation: Converting from decimal to binary involves repeatedly
dividing the decimal number by 2 and keeping track of the
remainders.
11.What is the first step when converting a binary number to
hexadecimal?
o (a) Convert the binary number to decimal.
o (b) Divide the binary number by 16.
o (c) Group the binary digits into sets of four, starting from the LSB.
o (d) Multiply each binary digit by its corresponding power of 16.
Correct Answer: (c)
Explanation: Conversion from binary to hexadecimal is simplified by
grouping the binary digits into sets of four.
12.What is the purpose of Alphanumeric Coding?
o (a) Increase CPU Performance.
o (b) Represent numbers, letters, or words by a special group of
symbols.
o (c) Perform mathematical calculations.
o (d) Store data in memory more efficiently.
Correct Answer: (b)
Explanation: Alphanumeric coding allows computers to handle text,
symbols and numbers.
13.What is the main advantage of BCD (Binary-Coded Decimal)?
o (a) It's more efficient than simple binary for storing large numbers.
o (b) It allows for simpler conversion between machine-readable and
human-readable numerals.
o (c) It requires less storage space than simple binary.
o (d) It allows for faster arithmetic operations.
Correct Answer: (b)
Explanation: BCD simplifies the process of converting between
decimal digits and their binary representation.
14.How many bits are required to code each decimal digit in BCD?
o (a) 1
o (b) 4
o (c) 8
o (d) 16
Correct Answer: (b)
Explanation: BCD uses four bits to represent each decimal digit (0-
9), as this is sufficient to represent the decimal value of 9 (1001).
15.What is the purpose of ASCII code?
o (a) To represent only numbers in a computer.
o (b) To provide a standard way to represent alphanumeric data (letters,
symbols, and numbers) in computers.
o (c) To perform mathematical calculations.
o (d) To compress data.
Correct Answer: (b)
Explanation: ASCII provides a standardized mapping between
characters and their numerical representation.
16.How many different characters can be represented with a 7-bit ASCII
code?
o (a) 64
o (b) 128
o (c) 256
o (d) 512
Correct Answer: (b)
Explanation: With 7 bits, you can represent 2^7 = 128 different
combinations.
17.When converting from binary to hexadecimal, if the last group of bits
does not have four bits, what should be done?
o (a) Discard the extra bits.
o (b) Add "1"s to the end of the group.
o (c) Add "0"s to the beginning of the group until it has four bits.
o (d) Leave the group as is.
Correct Answer: (c)
Explanation: Add leading zeroes to maintain the correct place values
and proper conversion.
18.What happens to a number with decimal numbers following after a
whole number like 215 or 526 when converting them to a Hexadecimal
number ?
o (a) It goes back to octal numbers
o (b) It breaks into smaller numbers
o (c) It is turned into whole numbers.
o (d) You will need to convert numbers by separating whole numbers
and decimal number conversion separately.
Correct Answer: (d)
Explanation: This division accounts for converting decimal number
like 215.8, you would need to take the whole number, 215 and the
numbers that follow it after the point for accuracy.
19.In converting octal to a binary system, what is the binary of 37 number?
o (a) 111111
o (b) 000111
o (c) 011111
o (d) 101101
Correct Answer: (c)
Explanation: Octal 3 is 011 and 7 is 111, combining them result in
011111
20.In hexadecimal conversions, what should be done?
o (a) Discard any groupings that are not in hexadecimal number
groupings
o (b) They should have the groupings properly assigned
o (c) Should be assigned the correct 0 to 9 and letter A to F groupings
o (d) There would be no specific process to it, it varies on the numbers
given
Correct Answer: (c)
Explanation: Following the 0 to 9 and A to F grouping is important
for correctly converting these hexadecimal numbers.

You might also like