0% found this document useful (0 votes)
8 views

Computer_Architecture_Fully_Explained_Answers

The document provides a comprehensive overview of computer architecture, covering data representation, computer arithmetic, register transfer, instruction codes, microprogrammed control, CPU organization, Flynn's classification, peripheral devices, and memory hierarchy. It explains various number systems, conversion methods, complements, and arithmetic operations using binary and decimal systems. Additionally, it discusses the organization of CPU registers, the role of control memory, and the classification of computer systems based on instruction and data streams.

Uploaded by

testingemail1k01
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Computer_Architecture_Fully_Explained_Answers

The document provides a comprehensive overview of computer architecture, covering data representation, computer arithmetic, register transfer, instruction codes, microprogrammed control, CPU organization, Flynn's classification, peripheral devices, and memory hierarchy. It explains various number systems, conversion methods, complements, and arithmetic operations using binary and decimal systems. Additionally, it discusses the organization of CPU registers, the role of control memory, and the classification of computer systems based on instruction and data streams.

Uploaded by

testingemail1k01
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Computer Architecture (BCAC201) -

Fully Explained Long Answers


Unit 1: Data Representation

1. Explain the difference between binary, octal, decimal, and hexadecimal


number systems with examples.
Number systems are essential in computing because they define how data is represented
and manipulated. The four common systems are:

1. Binary (Base-2): Uses only two digits: 0 and 1. This system is used internally by
computers because all digital logic is based on binary signals. Each binary digit (bit)
represents a power of 2. For example, the binary number 1011 means (1×2³ + 0×2² + 1×2¹
+ 1×2⁰) = 11 in decimal.

2. Octal (Base-8): Uses digits from 0 to 7. It's used as a shorthand for binary, where each
octal digit corresponds to a group of 3 binary digits. Example: Binary 101101 = Octal 55
(Group: 101 101).

3. Decimal (Base-10): This is the standard system humans use, consisting of digits from 0 to
9. Each digit represents a power of 10.

4. Hexadecimal (Base-16): Uses 0–9 and A–F (A=10 to F=15). It is compact and useful for
representing large binary values. Example: Binary 11001101 = Hex CD (Group: 1100 = C,
1101 = D).

These systems allow us to easily convert and interpret data between machine and human-
readable forms.

2. How do you convert a decimal number to its binary and hexadecimal


equivalents?
To convert a decimal number to binary:
1. Divide the number by 2.
2. Record the remainder.
3. Repeat division until the quotient is 0.
4. Write the remainders in reverse order.

Example: Convert 25 to binary:


25 ÷ 2 = 12 R1
12 ÷ 2 = 6 R0
6 ÷ 2 = 3 R0
3 ÷ 2 = 1 R1
1 ÷ 2 = 0 R1 → Binary = 11001

To convert decimal to hexadecimal:


1. Divide the number by 16.
2. Record the remainders.
3. Convert remainders >9 into A–F.
4. Reverse the order of remainders.

Example: Convert 255 to hex:


255 ÷ 16 = 15 R15 → 15 = F, 15 = F → Hex = FF

3. Define 1’s complement and 2’s complement with appropriate binary


examples.
1’s Complement:
This method inverts all bits of the binary number (0 becomes 1 and 1 becomes 0). It is used
to represent negative numbers in older systems.
Example: Binary 0101 (5 in 4 bits) → 1’s complement = 1010.

2’s Complement:
This is the most common method for representing negative numbers in computers. It is
obtained by adding 1 to the 1’s complement of a binary number.
Example: 5 in binary = 0101 → 1’s complement = 1010 → add 1 = 1011. So –5 in 4-bit 2’s
complement = 1011.

2’s complement is preferred because it allows unified addition/subtraction logic and


represents zero uniquely.

4. Differentiate between 9’s and 10’s complements using decimal examples.


9’s Complement:
Used in decimal subtraction. It is found by subtracting each digit from 9.
Example: 123 → 9’s comp = 876 (9–1, 9–2, 9–3).

10’s Complement:
Equal to the 9’s complement + 1. Used for subtraction like 2’s comp in binary.
Example: 123 → 9’s comp = 876 → +1 = 877 → 10’s complement = 877.

These are used in decimal subtraction, especially in digital calculators and old computing
systems.
5. What are r’s and (r–1)’s complements? Demonstrate with a base-8 example.
In any base-r number system:
(r–1)’s complement is obtained by subtracting each digit from r–1.
r’s complement = (r–1)’s complement + 1

Example (Base-8): Number = 453


(r–1) = 7 → Subtract each digit from 7:
7–4 = 3, 7–5 = 2, 7–3 = 4 → (r–1)’s comp = 324
Now add 1 → r’s complement = 325

These complements are useful in performing arithmetic without using subtraction circuits.

Unit 2: Computer Arithmetic

1. Explain addition and subtraction of sign-magnitude binary numbers.


In sign-magnitude representation, the leftmost bit indicates the sign (0 for positive, 1 for
negative), and the rest represent the magnitude.

Addition:
1. If the signs are the same, add the magnitudes and keep the sign.
2. If signs are different, subtract the smaller magnitude from the larger and use the sign of
the larger number.

Subtraction:
1. Change the sign of the subtrahend.
2. Follow the rules of addition above.

Example: (+5) + (–3) = 0101 + 1011 → subtract 3 from 5 = 2, sign = positive.

Unit 2: Computer Arithmetic (continued)

1. What is the procedure for performing addition using 2’s complement?


To perform addition using 2’s complement:
1. Convert both numbers to their 2’s complement binary form (if negative).
2. Add the two binary numbers using standard binary addition.
3. If the result exceeds the bit size, discard the carry.
4. If the sign bit changes unexpectedly (from expected result), overflow has occurred.

Example: 5 + (–3)
5 = 0101, –3 = 2’s comp of 0011 = 1101 → 0101 + 1101 = 10010 → result = 0010 (discard
carry) = 2.
2. How does subtraction work using 2’s complement representation? Give an
example.
In 2’s complement, subtraction is simplified by adding the negative value of the subtrahend.
Steps:
1. Take 2’s complement of subtrahend.
2. Add it to the minuend.
3. If carry occurs, discard it.

Example: 7 – 4 → 7 = 0111, 4 = 0100 → 2’s comp of 4 = 1100


0111 + 1100 = 0011 = 3.

Unit 3: Register Transfer and Micro-Operations

1. What is Register Transfer Language (RTL)? Give an example.


RTL is a symbolic language that describes the transfer of data between registers in a CPU.
It helps define how micro-operations are performed in each clock cycle.

Example: R1 ← R2 + R3 means 'Add contents of R2 and R3 and store result in R1'.

Unit 4: Basic Computer Organization and Design

1. Define instruction codes. Why are they essential in a computer system?


Instruction codes, or opcodes, are binary representations of machine-level operations like
ADD, SUB, etc.
They are essential for directing the CPU to perform specific actions on data stored in
memory or registers.

Each instruction typically includes an operation code and operand(s), allowing the control
unit to decode and execute it.

Unit 5: Microprogrammed Control

1. What is control memory and how is it used in microprogrammed control?


Control memory is a type of ROM that stores microinstructions, which are the control
signals needed to execute each machine instruction. In a microprogrammed control unit,
each machine instruction corresponds to a microprogram, which is a sequence of
microinstructions. When the CPU fetches a machine instruction, it uses a control address
register (CAR) to access the corresponding microprogram in the control memory. This
allows complex operations to be broken into simpler steps, improving flexibility.
Unit 6: Central Processing Unit (CPU)

1. Explain the general register organization of a CPU with a diagram.


The general register organization includes multiple registers connected by a bus system and
controlled by a central control unit. Each register is used to store operands and results of
operations. A typical CPU includes an ALU (Arithmetic Logic Unit), control logic, input and
output buses, and general-purpose registers (R0–Rn). Registers are selected via decoders
and multiplexers for read and write operations. This arrangement allows for fast access and
manipulation of data, reducing memory access times.

Unit 7: Pipeline and Vector Processing

1. Explain Flynn’s classification of computer systems with suitable examples.


Flynn’s taxonomy classifies computer architectures based on the number of concurrent
instruction and data streams:

1. SISD (Single Instruction, Single Data): Traditional single-core processors that execute one
instruction on one data item at a time.
2. SIMD (Single Instruction, Multiple Data): Applies one instruction to many data points
simultaneously (e.g., GPUs).
3. MISD (Multiple Instruction, Single Data): Rare architecture where multiple instructions
operate on the same data.
4. MIMD (Multiple Instruction, Multiple Data): Used in multicore and multiprocessor
systems where different processors execute different instructions on different data.

Unit 8: Input – Output Organization

1. What are peripheral devices? Classify them with two examples.


Peripheral devices are external hardware devices connected to the computer for input,
output, or storage. They serve as interfaces between the user and the computer system.

Types:
1. Input Devices – send data to the system. Examples: Keyboard, Mouse
2. Output Devices – receive data from the system. Examples: Monitor, Printer
3. Input/Output Devices – do both. Example: Touchscreen

Unit 9: Memory Organization

1. Explain the memory hierarchy in a computer system with examples.


Memory hierarchy is a structure that uses multiple levels of memory with different speeds
and sizes to optimize performance and cost.
1. Registers: Fastest, located in CPU.
2. Cache Memory: Fast, small size, stores frequently accessed data.
3. Main Memory (RAM): Used for active processes.
4. Secondary Storage: HDD/SSD for long-term storage.
5. Tertiary Storage: External drives or cloud-based systems.

Data is moved between levels to balance speed and capacity.

You might also like