CompArchitecture Suggestion Semester
CompArchitecture Suggestion Semester
1. Explain the differences between decimal, binary, octal, and hexadecimal number systems.
Decimal: Base-10 system, uses digits 0-9. Most common system for everyday counting.
Binary: Base-2 system, uses digits 0 and 1. Essential for digital electronics and computing.
Octal: Base-8 system, uses digits 0-7. Simplifies representation of binary numbers (each octal
digit represents three binary digits).
Hexadecimal: Base-16 system, uses digits 0-9 and letters A-F (where A=10, B=11, ..., F=15).
Compact representation of binary numbers (each hex digit represents four binary digits).
3. Describe the 1’s complement and 2’s complement methods for representing negative numbers.
1’s Complement: Inverts all bits of the binary representation of a number (0 becomes 1, and 1
becomes 0). For example, the 1’s complement of 5 (00000101) is 11111010.
2’s Complement: Inverts all bits and adds 1 to the least significant bit (LSB). For example, the
2’s complement of 5 (00000101) is 11111011. This method simplifies arithmetic operations as it
allows using the same addition circuitry for both addition and subtraction.
4. What are 9’s complement and 10’s complement representations? Provide examples.
9’s Complement: Subtract each digit from 9. For example, the 9’s complement of 1234 is
8765.
10’s Complement: 9’s complement of the number plus 1. For example, the 10’s complement of
1234 is 8765 + 1 = 8766.
6. How is arithmetic addition performed with fixed point integers? Illustrate with an example.
Addition is performed as with normal integers, ensuring the fixed point (decimal point) aligns
correctly. For example, adding 12.34 (fixed point) and 56.78:
```
12.34
+56.78
------
69.12
```
11. How is the IEEE 754 standard used for floating point representation?
IEEE 754 standard defines the format for floating point numbers, including single precision
(32-bit) and double precision (64-bit). It specifies the layout of the sign bit, exponent, and
significand (mantissa).
12. What are the components of an IEEE 754 floating point number?
Sign Bit: 1 bit indicating the sign (0 for positive, 1 for negative).
Exponent: Adjusted (biased) exponent to support both positive and negative exponents.
Mantissa: Fractional part of the number.
13. Explain the concept of bias in IEEE 754 floating point representation.
The exponent is stored with a bias to allow representation of both positive and negative
exponents. For single precision, the bias is 127. So, an exponent of 0 is stored as 127, and -1 is
stored as 126.
15. Compare and contrast fixed point and floating point representations.
Fixed Point: Simpler, faster, and uses less hardware, but limited range and precision. Suitable
for embedded systems and applications requiring predictable precision.
Floating Point: More complex and requires more hardware, but provides a wide range of
values and precision. Ideal for scientific, engineering, and general-purpose computing
applications.
18. Explain the addition algorithm for signed 2’s complement numbers.
Steps:
1. Add the two binary numbers, including their sign bits.
2. Ignore any carry out from the most significant bit (MSB).
3. If the result is negative (sign bit is 1), it is already in 2’s complement form.
19. Describe the subtraction algorithm for signed 2’s complement numbers.
Steps:
1. Take the 2’s complement of the number to be subtracted (invert all bits and add 1).
2. Add this result to the first number.
3. Ignore any carry out from the MSB.
Example:
Multiplying 3 (0011) and -4 (1100):
```
Booth's steps:
Initialization: A = 0000, Q = 0011, M = 1100, Q-1 = 0.
Check Q0 and Q-1:
1. 00: Shift.
2. 11: A = A M (0000 1100 = 0100), shift.
3. 01: A = A + M (0100 + 1100 = 0000), shift.
Result: 1100 (binary for -12).
```
21. Explain the multiplication algorithm for binary numbers.
Steps:
1. Align the numbers such that the multiplier is on the right.
2. For each bit in the multiplier, if the bit is 1, add the multiplicand shifted appropriately to
the left.
3. If the bit is 0, skip to the next bit.
4. Sum all partial results to get the final product.
22. How is division performed using binary numbers? Illustrate with an example.
Steps:
1. Align the divisor and dividend.
2. Subtract the divisor from the most significant part of the dividend.
3. If the result is positive, write 1 in the quotient and bring down the next bit.
4. If the result is negative, write 0 in the quotient, restore the previous result, and bring down
the next bit.
5. Repeat until all bits are processed.
23. Compare the efficiency of Booth’s algorithm with the standard multiplication algorithm.
Booth’s algorithm is more efficient for multipliers with large blocks of 1s, as it reduces the
number of required addition operations by skipping over these blocks. It performs better with
fewer operations compared to the standard algorithm, especially for numbers with many
consecutive 1s. The standard multiplication algorithm is simpler but can be less efficient due to
more frequent additions and shifts.
24. What are the advantages of using 2’s complement for arithmetic operations?
Simplifies the hardware design for addition and subtraction, as the same circuit can be used for
both operations.
Eliminates the need for separate sign handling, as negative numbers are represented uniquely.
Allows for easy detection of overflow and underflow conditions.
28. Describe the bus system for registers and its importance.
A bus system for registers consists of a common data path shared by multiple registers to
transfer data. It allows for efficient data movement and communication between different parts
of a computer system. By using a bus, the number of required interconnections is minimized,
reducing complexity and cost.
40. What are selective set, selective complement, and selective clear operations?
Selective Set: Sets specific bits of a register to 1 while leaving other bits unchanged.
Implemented using the OR operation.
Example: R1 ← R1 OR 00001000 (sets the fourth bit of R1).
Selective Complement: Complements specific bits of a register (changes 1 to 0 and 0 to 1)
while leaving other bits unchanged. Implemented using the XOR operation.
Example: R1 ← R1 XOR 00001000 (complements the fourth bit of R1).
Selective Clear: Clears specific bits of a register to 0 while leaving other bits unchanged.
Implemented using the AND operation with the complement of the mask.
Example: R1 ← R1 AND 11110111 (clears the fourth bit of R1).
41. What are instruction codes and their importance in computer architecture?
Instruction Codes: Binary codes that represent specific operations to be performed by the
computer’s CPU. Each instruction code typically consists of an opcode (operation code) that
specifies the operation and operands that specify the data or the addresses of the data.
Importance: Instruction codes are fundamental to computer architecture as they define the set
of operations a computer can perform. They enable the CPU to interpret and execute commands,
forming the basis of programming and computation.
42. Explain the concepts of direct address, indirect address, and effective address.
Direct Address: The address field of the instruction contains the actual memory address of the
operand.
Indirect Address: The address field of the instruction contains a memory address that points to
another memory address where the operand is stored.
Effective Address: The actual memory address from which the operand is fetched. In direct
addressing, the effective address is the same as the address field. In indirect addressing, the
effective address is the address pointed to by the address field.
47. Provide a block diagram and brief explanation of the control unit of a basic computer.
Block Diagram:
```
+-------------------+
| |
| Control Unit |
| |
+---+---+---+---+---+
| | | |
+---+ | | +---+
| | | |
PC IR Flags Control Signals
```
Explanation: The control unit fetches instructions from memory, decodes them to determine
the required operations, and generates control signals to execute the instructions. It coordinates
the activities of the CPU and directs the flow of data between the CPU, memory, and peripherals.
66. Explain the different types of CPU organization: single accumulator, general register, and
stack organization.
Single Accumulator: Uses one accumulator for all operations.
Example: ADD A (Accumulator = Accumulator + A)
General Register: Uses multiple registers for operations.
Example: ADD R1, R2 (R1 = R1 + R2)
Stack Organization: Uses a stack for operations.
Example: Push A, Pop B, Add (Top = Top + Next)
72. Describe the different types of interrupts: external, internal, and software interrupts.
External Interrupts: Generated by external devices (e.g., I/O devices).
Internal Interrupts: Generated by the CPU (e.g., divide-by-zero error).
Software Interrupts: Generated by executing specific instructions (e.g., system calls).
98. What are the different types of RAM? Explain their characteristics.
SRAM (Static RAM):
Uses bistable latching circuitry.
Faster and more reliable than DRAM.
More expensive, consumes more power.
DRAM (Dynamic RAM):
Stores data as charge
in capacitors.
Slower than SRAM, but denser and cheaper.
Requires periodic refreshing to maintain data.
101. Describe the different cache memory mapping techniques: direct, associative, and set
associative.
Direct Mapping: Each block of main memory maps to only one cache line.
Advantage: Simple and fast.
Disadvantage: Potential for high conflict misses.
Associative Mapping: Any block of main memory can be loaded into any cache line.
Advantage: Reduces conflict misses.
Disadvantage: More complex and slower to search.
Set Associative Mapping: Combines direct and associative mapping by dividing cache into
sets.
Advantage: Balances complexity and conflict misses.
Disadvantage: More complex than direct mapping.
102. What is Content Addressable Memory (CAM)? Describe its hardware organization.
Content Addressable Memory (CAM): A type of memory where data is accessed based on
content rather than address.
Hardware Organization: Consists of an array of memory cells with logic circuitry for parallel
searching of data. Each cell stores a bit and can compare the stored bit with the search bit
simultaneously.
110. Define and explain seek time, rotational delay, access time, transfer time, and latency in the
context of disk storage.
Seek Time: The time it takes for the read/write head to move to the track where the data is
located.
Rotational Delay: The time it takes for the desired sector of the disk to rotate under the
read/write head.
Access Time: The total time to access data, including seek time and rotational delay.
Transfer Time: The time it takes to actually transfer the data once the read/write head is
positioned correctly.
Latency: The delay before data transfer begins, often synonymous with rotational delay in the
context of disks.