0% found this document useful (0 votes)
29 views16 pages

DMS Answer Paper

Uploaded by

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

DMS Answer Paper

Uploaded by

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

### (a) Definitions:

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.

### (b) Number of select lines for multiplexers:


1. **8:1 Multiplexer**: 3 select lines are needed.
2. **4:1 Multiplexer**: 2 select lines are needed.

### (c) Applications of flip-flops:


1. Data storage elements in memory devices.
2. Used in shift registers.
3. Utilized in counters.
4. Used for synchronizing asynchronous data.

### (d) Applications of logic gates:


1. **OR Gate**: Used in alarm systems, where an alert is triggered if any input condition is met.
2. **AND Gate**: Commonly used in control circuits, where all input conditions must be met to
produce an output.

### (e) Addressing modes of 8086:


1. Immediate Addressing
2. Direct Addressing
3. Register Addressing
4. Register Indirect Addressing
5. Indexed Addressing
6. Base-Indexed Addressing

### (f) Applications of segment and pointer registers:


1. Segment registers are used to divide memory into segments for efficient data and code
management.
2. Pointer registers hold addresses within segments, often used to access data or code directly.

### (g) Shift instructions of 8086 with format:


1. **SHL (Shift Left)**: `SHL destination, count`
2. **SHR (Shift Right)**: `SHR destination, count`

Q2)

### (a) Convert the following decimal numbers to binary (4 marks)


1. **Convert 129 to binary**:
- Divide 129 by 2 and write down the remainders until you reach 0:
- 129 ÷ 2 = 64, remainder 1
- 64 ÷ 2 = 32, remainder 0
- 32 ÷ 2 = 16, remainder 0
- 16 ÷ 2 = 8, remainder 0
- 8 ÷ 2 = 4, remainder 0
- 4 ÷ 2 = 2, remainder 0
- 2 ÷ 2 = 1, remainder 0
- 1 ÷ 2 = 0, remainder 1
- Write the remainders in reverse: **129 in binary is 10000001**.

2. **Convert 181 to binary**:


- Divide 181 by 2 and write down the remainders until you reach 0:
- 181 ÷ 2 = 90, remainder 1
- 90 ÷ 2 = 45, remainder 0
- 45 ÷ 2 = 22, remainder 1
- 22 ÷ 2 = 11, remainder 0
- 11 ÷ 2 = 5, remainder 1
- 5 ÷ 2 = 2, remainder 1
- 2 ÷ 2 = 1, remainder 0
- 1 ÷ 2 = 0, remainder 1
- Write the remainders in reverse: **181 in binary is 10110101**.

---

### (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:

1. **Given Minterms**: Suppose we have minterms for a 3-variable function \( F(A, B, C) \)


represented as \( m(1, 3, 5, 7) \).

2. **Standard SOP Expression**:


- For minterm 1: \( A'B'C \)
- For minterm 3: \( A'BC \)
- For minterm 5: \( AB'C \)
- For minterm 7: \( ABC \)
- Combine: \( F(A, B, C) = A'B'C + A'BC + AB'C + ABC \).

3. **Further Simplification** (if possible): Combine terms using Boolean algebra rules. This gives
a simplified SOP form.

### (c) Simplify the Boolean Expression \( Y(A, B, C, D) = (A + C + D) + (B + C + D) \) (4 marks)

1. **Expression**: \( Y(A, B, C, D) = (A + C + D) + (B + C + D) \).

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.

4. **Result**: Present the minimized form.

### (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**:

| S | R | Q (Next State) | Description |


|---|---|----------------|-------------|
| 0 | 0 | No change | Hold |
|0|1|0 | Reset |
|1|0|1 | Set |
| 1 | 1 | Invalid | Invalid |

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**:

| T | Q (Next State) | Description |


|---|----------------|-------------|
| 0 | No change | Hold |
| 1 | Toggle | Toggle |

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)

1. **Given Expression**: \( Y = (AB + A + B) \cdot AB \)

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
\]

3. **Result**: The simplified expression is **\( Y = 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)

#### (i) OR Gate using NAND Gates:


1. **Design**: The OR gate can be created using NAND gates. The formula is:
\[
A + B = ((A \cdot A) \cdot (B \cdot B))'
\]
Here, the NAND gates are arranged so that each input is fed to a NAND gate with itself, then
both outputs go to another NAND gate.

2. **Truth Table**:

| A | B | A OR B |
|---|---|--------|
|0|0|0 |
|0|1|1 |
|1|0|1 |
|1|1|1 |

#### (ii) NOT Gate using NAND Gate:


1. **Design**: The NOT gate can be created by connecting both inputs of a single NAND gate to
the same signal. The formula is:
\[
A' = (A \cdot A)'
\]

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 \)

2. **Rotate Left through Carry Contents of BX by Four Positions**:


- **Operation**: Rotate **BX** by 4 positions to the left.
- **BX (after rotation)**: Shifting **55F9H** left by 4 results in **5F95H**.

3. **Shift Left Contents of AX by 6 Positions**:


- **Operation**: Shift **AX** left by 6.
- **AX (after shift)**: Shifting **3A69H** left by 6 gives **9A40H**.

4. **ADD AX, BX**:


- **Operation**: Add the final values of **AX** and **BX**.
- **AX (after addition)**: **9A40H + 5F95H = F9D5H**

---

### (c) Represent the following expression using a MUX (4 marks)

Given Expression:
\[
Y = \Sigma m (0, 3, 5, 9, 10, 12, 14)
\]

1. **3-to-8 Line MUX Design**:


- The expression corresponds to minterms **0, 3, 5, 9, 10, 12, and 14**. We use a 3-to-8 MUX
where inputs are connected to 1 for these minterms and 0 otherwise.

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)

1. **Physical Address Calculation**: In the 8086 microprocessor, a physical address is


calculated by combining the segment register and offset register. The segment register provides
the base address, and the offset is added to this base to determine the actual memory location.

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**:

| A | B | Sum (S) | Carry (C) |


|---|---|---------|-----------|
|0|0|0 |0 |
|0|1|1 |0 |
|1|0|1 |0 |
|1|1|0 |1 |

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)

#### (i) JK Flip-Flop


1. **Symbol**: JK Flip-Flop symbol has inputs labeled **J** and **K**, along with a clock input.
2. **Truth Table**:

| J | K | Q (Next State) | Description |


|---|---|----------------|-------------|
| 0 | 0 | No Change | Hold |
|0|1|0 | Reset |
|1|0|1 | Set |
| 1 | 1 | Toggle | Toggle |

3. **Explanation**: The JK Flip-Flop can hold, reset, set, or toggle its state, depending on the
values of J and K inputs.

#### (ii) D Flip-Flop


1. **Symbol**: D Flip-Flop has a single **D** input and a clock input.
2. **Truth Table**:

| D | Q (Next State) | Description |


|---|----------------|-------------|
|0|0 | Reset |
|1|1 | Set |
3. **Explanation**: The D Flip-Flop stores the value at the **D** input on each clock pulse,
effectively "latching" it for use in sequential circuits.

---

### (d) Compare CISC with RISC processors (4 marks)

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.

2. **Example of Edge Triggering**:


- For a **D Flip-Flop** triggered on a positive edge, the output Q will change to the value of D
only when the clock transitions from 0 to 1.

3. **Importance of Edge Triggering**:


- It allows synchronous changes at specific clock intervals, preventing unwanted state
changes during stable clock levels.
4. **Usage**: Edge triggering is widely used in sequential circuits to synchronize data transfer
and processing

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)

**Question Rephrased**: Write an assembly language program to perform multiplication of an


8-bit number with a 16-bit number, storing the 24-bit result.

**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**.

2. **Result**: The result will be a 24-bit value stored across **DX:AX**.

---

### (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

1. **Definition**: Memory segmentation is a technique used in microprocessors to divide


memory into different segments (or sections) for easier data organization and access.

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.

4. **Example**: In a simple two-stage pipeline, while Instruction 1 is being executed, Instruction


2 can be fetched, resulting in continuous instruction processing.

---

### (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\)

- **Result**: Binary `1011` is converted to **Gray code `1110`**.

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**:

1. **Pipeline Architecture in CISC**:


- CISC processors are designed with complex instructions that can perform multiple
operations within a single instruction. To enhance performance, CISC processors may use
pipelining, where an instruction is broken down into stages, allowing for multiple instructions to
be processed simultaneously.

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.

3. **Improving System Throughput**:


- Pipelining improves throughput by allowing new instructions to enter the pipeline before
previous instructions are completely finished. This keeps the CPU busy and reduces idle times.
- By overlapping instruction execution, a CISC processor can handle more instructions per
unit time, increasing the overall efficiency of the processor.

4. **Challenges in CISC Pipelining**:


- CISC architectures have variable-length instructions and complex addressing modes, which
make pipelining more challenging.
- Instruction-level parallelism can be limited due to dependencies between complex
instructions.

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**:

1. **Assumptions for Fig. 1**:


- Since Fig. 1 isn’t provided, let’s assume it shows a combination of basic gates (AND, OR,
NOT) that create a specific logical function.

2. **Creating the Truth Table**:


- Analyze each gate’s output based on different input combinations.
- For example, if the circuit represents an **AND-OR configuration**, determine the final
output for all input possibilities (0s and 1s for each input).

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

You might also like