DMS Answer Paper
DMS Answer Paper
1. **Word**: A word is a unit of data typically comprising multiple bytes (such as 16 or 32 bits)
used in digital computing and processing.
2. **Nibble**: A nibble is half of a byte, consisting of 4 bits.
Q2)
---
### (b) Simplify the given minterms into Standard SOP form (4 marks)
To proceed with the simplification in standard SOP form, the specific minterms are needed.
However, as an example:
3. **Further Simplification** (if possible): Combine terms using Boolean algebra rules. This gives
a simplified SOP form.
—
2. **Step-by-Step Simplification**:
- Apply the **Distributive Law**: Expand terms with common factors.
- Combine terms by removing duplicates using **Idempotent and Absorption Laws**.
3. **Final Simplified SOP**: Based on the simplification, we derive the simplest SOP form,
reducing redundant terms.
### (d) Draw symbol and truth table for SR and T Flip-Flop (4 marks each)
#### SR Flip-Flop
1. **Symbol**:
- A block with inputs labeled **S** (Set) and **R** (Reset), and outputs **Q** and **Q'**.
2. **Truth Table**:
3. **Explanation**:
- If **S = 1** and **R = 0**, the flip-flop sets **Q = 1**.
- If **S = 0** and **R = 1**, it resets **Q = 0**.
- If **S = R = 1**, it's an invalid state.
#### T Flip-Flop
1. **Symbol**:
- A block with a single **T** input and outputs **Q** and **Q'**.
2. **Truth Table**:
3. **Explanation**:
- When **T = 1**, the output toggles between 0 and 1 with each clock pulse.
- When **T = 0**, it holds the current state.
### (e) Simplify the Expression \( Y = (AB + A + B) \cdot AB \) and Draw Logic Diagram (4
marks)
2. **Simplification Steps**:
- Distribute \( AB \):
\[
Y = AB \cdot AB + AB \cdot A + AB \cdot B
\]
- Simplify each term using Boolean rules:
\[
Y = AB + AB + AB = AB
\]
4. **Logic Diagram**:
- A single **AND gate** with inputs **A** and **B**, producing output **Y**.
Q3
### (a) Design the following gates using a universal gate and write their truth tables (4 marks
each)
2. **Truth Table**:
| A | B | A OR B |
|---|---|--------|
|0|0|0 |
|0|1|1 |
|1|0|1 |
|1|1|1 |
2. **Truth Table**:
| A | A' (NOT A) |
|---|------------|
|0|1 |
|1|0 |
---
### (b) Interpret the following program and specify the output (4 marks each)
Given Program:
```assembly
MOV BX, 55F9H
MOV AX, 3A69H
```
1. **Masking of Higher Nibble of AX**:
- **Operation**: Apply a bitwise AND with 0x0F to keep only the lower nibble of **AX**.
- **AX (after masking)**: \( 3A69H \land 0F00H = 0069H \)
---
Given Expression:
\[
Y = \Sigma m (0, 3, 5, 9, 10, 12, 14)
\]
2. **Implementation**:
- Connect the select lines **A, B, C** to the MUX.
- Set MUX inputs to **1** for lines **0, 3, 5, 9, 10, 12, 14** and **0** for the others.
---
### (d) Compare Min. and Max. mode of operation of 8086 (4 marks)
1. **Minimum Mode**:
- **Single processor** mode.
- Control signals are generated internally.
- **HOLD** and **HLDA** signals are used for bus control.
- Used in small systems where only one processor controls the bus.
2. **Maximum Mode**:
- **Multi-processor** environment.
- Control signals are generated externally by a bus controller.
- **RQ/GT** signals manage bus requests.
- Suitable for complex, multi-processor systems, allowing for external control of resources.
Q4
Here is a detailed answer for each question, designed to be worth four marks each.
---
### (a) Explain the process of physical address calculation with a suitable example (4 marks)
2. **Formula**:
\[
\text{Physical Address} = (\text{Segment} \times 16) + \text{Offset}
\]
- The segment value is multiplied by 16 (or shifted left by 4 bits), creating a 20-bit address
space.
3. **Example**:
- **Segment Register**: 1234H
- **Offset Register**: 0020H
- **Calculation**:
\[
\text{Physical Address} = (1234H \times 10H) + 0020H = 12340H + 0020H = 12360H
\]
- So, the physical address is **12360H**.
4. **Explanation**: This method allows the 8086 to address a memory range larger than its
16-bit registers alone would permit by creating 20-bit addresses.
---
### (b) Draw and explain a Half Adder and specify its truth table (4 marks)
1. **Half Adder Circuit**: A Half Adder is a combinational circuit that adds two single-bit binary
numbers. It has two outputs: **Sum** and **Carry**.
2. **Logic Diagram**:
- Sum (S) = A XOR B
- Carry (C) = A AND B
3. **Truth Table**:
4. **Explanation**: The Half Adder outputs the sum of the inputs, and if both inputs are 1, it
generates a carry output of 1. This circuit is used in digital addition operations.
---
### (c) Draw symbols and write truth tables for JK and D Flip-Flop (4 marks each)
3. **Explanation**: The JK Flip-Flop can hold, reset, set, or toggle its state, depending on the
values of J and K inputs.
---
1. **Instruction Set**:
- **CISC**: Complex Instruction Set Computer with many specialized instructions.
- **RISC**: Reduced Instruction Set Computer with a smaller, optimized instruction set.
2. **Execution Time**:
- **CISC**: Instructions may take multiple cycles to execute, as they are more complex.
- **RISC**: Instructions are designed to execute in a single cycle, allowing for faster
processing.
3. **Memory Usage**:
- **CISC**: Larger memory usage due to complex instructions that require more bits.
- **RISC**: Optimized memory usage with simpler instructions.
4. **Pipeline Efficiency**:
- **CISC**: Pipelining can be challenging due to the variable length and complexity of
instructions.
- **RISC**: Easily pipelined due to uniform instruction length, enhancing performance.
---
### (e) Explain types of triggering in flip-flops with a suitable example (4 marks)
1. **Types of Triggering**:
- **Level Triggering**: Flip-flop changes state while the clock level is high or low.
- **Edge Triggering**: Flip-flop changes state only on the rising or falling edge of the clock
signal.
- **Positive Edge Triggering**: Triggers on the transition from low to high.
- **Negative Edge Triggering**: Triggers on the transition from high to low.
Q5
Here is a detailed answer for each question, rephrased and formatted for clarity, with each part
worth four marks.
---
### (a) Write an Assembly Language Program (ALP) to multiply an 8-bit number with a 16-bit
number (4 marks)
**Answer**:
This example assumes the 8-bit number is stored in register **AL** and the 16-bit number in
register **BX**. The result will be stored in **DX:AX** (24-bit result).
```assembly
MOV AL, 0x15 ; Load 8-bit number into AL (example value: 0x15)
MOV BX, 0x1234 ; Load 16-bit number into BX (example value: 0x1234)
MUL BX ; Multiply AL with BX
; Result stored in DX:AX (DX contains high bits, AX contains low bits)
```
1. **Explanation**:
- `MOV AL, 0x15` loads an 8-bit number into the **AL** register.
- `MOV BX, 0x1234` loads a 16-bit number into **BX**.
- `MUL BX` multiplies the 8-bit number in **AL** with the 16-bit number in **BX**.
---
### (b) Explain the concept of memory segmentation and pipelining (4 marks each)
**Question Rephrased**: Define and explain the concepts of memory segmentation and
pipelining, describing how they work and their advantages.
#### Memory Segmentation
2. **How It Works**: In the 8086 microprocessor, memory is divided into segments such as
code, data, stack, and extra segments, each with a base address stored in a segment register.
Each segment is addressed by combining a segment register with an offset.
3. **Advantages**:
- **Larger Addressing Space**: Allows 16-bit processors to address up to 1 MB of memory.
- **Improved Organization**: Separates code, data, and stack, making memory management
more efficient.
4. **Example**: If the Code Segment (CS) register holds **2000H** and the Instruction Pointer
(IP) holds **0010H**, the physical address of the code is calculated as:
\[
\text{Physical Address} = (2000H \times 10H) + 0010H = 20010H
\]
#### Pipelining
1. **Definition**: Pipelining is a technique that divides the execution of instructions into multiple
stages, allowing a new instruction to begin before the previous one has finished.
2. **How It Works**: Each instruction passes through stages like fetching, decoding, executing,
and writing back. While one instruction is being executed, the next one can be fetched,
increasing CPU throughput.
3. **Advantages**:
- **Increased Efficiency**: Enables multiple instructions to be processed simultaneously,
improving CPU performance.
- **Reduced Instruction Cycle Time**: Allows faster execution of instructions as the CPU
doesn't have to wait for each instruction to fully complete.
---
### (c) Explain binary to Gray code conversion with a suitable example (4 marks)
**Question Rephrased**: Describe the process of converting a binary number to its equivalent
Gray code, using an example for clarity.
**Answer**:
1. **Definition**: Gray code is a binary numeral system where two successive values differ in
only one bit, which reduces errors in digital systems.
2. **Conversion Process**:
- The most significant bit (MSB) of the Gray code is the same as the MSB of the binary
number.
- For each subsequent bit, XOR the previous bit of the binary number with the current bit.
3. **Example**:
- **Binary Number**: `1011`
- **Gray Code Conversion**:
- **Step 1**: Copy the MSB: `1`
- **Step 2**: XOR the first and second bits of binary: \(1 \oplus 0 = 1\)
- **Step 3**: XOR the second and third bits of binary: \(0 \oplus 1 = 1\)
- **Step 4**: XOR the third and fourth bits of binary: \(1 \oplus 1 = 0\)
4. **Importance**: Gray code is widely used in digital systems to prevent spurious outputs and
reduce the chance of error during transitions between states.
Q6
Here is a rephrased version of each question with a detailed answer for each, worth six marks
each.
---
### (a) Describe the pipeline architecture concept in CISC that helps improve system
throughput (6 marks)
**Question Rephrased**: Explain the pipeline architecture concept used in CISC (Complex
Instruction Set Computer) processors, and how it contributes to improving system throughput.
**Answer**:
2. **Stages of a Pipeline**:
- Typical stages in a CISC pipeline include:
- **Fetch**: The next instruction is retrieved from memory.
- **Decode**: The instruction is decoded to understand the required operation.
- **Execute**: The decoded instruction is carried out.
- **Memory Access**: Data is read from or written to memory if needed.
- **Write Back**: Results are stored in the destination register.
5. **Conclusion**:
- Despite the challenges, pipelining in CISC helps improve instruction throughput, making it
essential in optimizing CISC-based systems.
---
### (b) Given the following logic diagram in Fig. (1), write its truth table. Identify the equivalent
gate for the obtained truth table (6 marks)
**Question Rephrased**: Based on the provided logic diagram (Fig. 1), create its truth table,
analyze the output for each input combination, and identify the gate that performs the same
function.
**Answer**:
3. **Example**:
- Suppose the circuit is a combination of an AND gate followed by an OR gate.
- Input variables: **A**, **B**, and **C**
- The output **Y** could be something like \( Y = (A \cdot B) + C \)
4. **Truth Table**:
| A | B | C | (A AND B) | Y = (A AND B) OR C |
|---|---|---|-----------|--------------------|
|0|0|0|0 |0 |
|0|0|1|0 |1 |
|0|1|0|0 |0 |
|0|1|1|0 |1 |
|1|0|0|0 |0 |
|1|0|1|0 |1 |
|1|1|0|1 |1 |
|1|1|1|1 |1 |
5. **Equivalent Gate**:
- Based on the truth table, the function resembles an **OR gate with inputs being a product
term (A AND B) and C**. The equivalent expression is:
\[
Y = (A \cdot B) + C
\]
- Thus, the circuit's function is equivalent to an **OR gate** that operates on the output of an
AND gate and an additional input.
---
### (c) Write an Assembly Language Program (ALP) for finding the smallest number from an
array of ‘n’ numbers (6 marks)
**Question Rephrased**: Write an assembly language program to find the smallest value in an
array containing ‘n’ numbers.
**Answer**:
1. **Assumptions**:
- Assume the array starts at memory location `ARRAY` and the count of elements (`n`) is
stored in register **CX**.
- **AX** will be used to store the smallest number found.
2. **Program**:
```assembly
MOV CX, n ; Load the number of elements into CX
MOV SI, OFFSET ARRAY; Load the starting address of ARRAY into SI
MOV AX, [SI] ; Load the first element of ARRAY into AX (initial smallest)
INC SI ; Move to the next element
FIND_SMALLEST:
CMP CX, 1 ; Check if all elements have been checked
JE DONE ; If yes, jump to DONE
MOV BX, [SI] ; Load current element into BX
CMP AX, BX ; Compare AX (current smallest) with BX (next element)
JLE SKIP ; If AX <= BX, skip the update
MOV AX, BX ; If AX > BX, update AX with BX (new smallest)
SKIP:
INC SI ; Move to the next element
LOOP FIND_SMALLEST ; Repeat for all elements in the array
DONE:
; AX now contains the smallest number
```
3. **Explanation**:
- **MOV CX, n**: Loads the count of numbers into **CX** for looping.
- **MOV AX, [SI]**: Initializes **AX** with the first number as the smallest.
- **CMP AX, BX** and **JLE SKIP**: Compares **AX** with the next element and updates
**AX** if a smaller number is found.
- **LOOP FIND_SMALLEST**: Repeats the process until all elements are checked.
4. **Result**:
- After the loop completes, **AX** contains the smallest number in the array.
End