2082 2

BIT151 ยท 2082 ยท 10 marks

Explain the features of SAP2 computer with well labeled block diagram.How is it different compared to SAP1 Computer?[8+2]

Explain the features of SAP2 computer with well labeled block diagram.How is it different compared to SAP1 Computer?[8+2]

Microprocessor and Computer ArchitectureChapter 6: Simple Computer Architecture ModelsSAP 2 computer features and architecture

Quick answer

SAP-2 is an improved version of SAP-1, designed to be more powerful and closer to a real microprocessor. It has an 8-bit architecture with enhanced instruction set, more registers, and bidirectional data bus.

SAP-2 Computer: Features, Block Diagram, and Comparison with SAP-1

Note: The reference notes did not contain this topic. The following answer is based on standard computer architecture curriculum as taught in TU BSc CSIT (Malvino's "Digital Computer Electronics" textbook content), which is the standard source for SAP computers in this course.


SAP-2 (Simple As Possible - 2) Computer


Features of SAP-2 Computer

1. 8-bit Bidirectional Data Bus

  • SAP-2 uses a bidirectional bus (unlike unidirectional in SAP-1), allowing data to flow in both directions between components.

2. 64 KB Memory (16-bit Address)

  • SAP-2 has a 16-bit Program Counter and can address up to 65,536 (64K) memory locations, a significant improvement over SAP-1's 16-byte memory.

3. More General Purpose Registers

  • SAP-2 contains:
    • Accumulator (A) - 8-bit
    • Register B - 8-bit
    • Register C - 8-bit
    • B and C can be used for temporary data storage.

4. Input/Output Ports

  • SAP-2 has dedicated input ports (Port 1, Port 2) and output ports (Port 3) for I/O operations, making it capable of real I/O communication.

5. Flags Register

  • SAP-2 includes a Flags register with:
    • Sign Flag (S) - set if result is negative
    • Zero Flag (Z) - set if result is zero
  • These flags enable conditional jump instructions.

6. Enhanced ALU

  • The ALU supports more operations:
    • Addition (ADD)
    • Subtraction (SUB)
    • Logical AND, OR, NOT (logical operations)
    • Increment / Decrement

7. Larger Instruction Set

  • SAP-2 supports a much richer instruction set including:
    • Data transfer: MOV, MVI, LDA, STA
    • Arithmetic: ADD, SUB, INR, DCR
    • Logical: ANA, ORA, CMA
    • Branch: JMP, JZ, JNZ, JM
    • I/O: IN, OUT
    • Control: HLT

8. Controller/Sequencer

  • Uses a more complex control unit with more control words to handle the larger instruction set and more components.

9. Stack Pointer (in some versions)

  • Some implementations include a Stack Pointer for subroutine handling.

10. Instruction Register (IR)

  • 8-bit IR stores the fetched instruction. The opcode is decoded by the controller.

Well-Labeled Block Diagram of SAP-2

        +------------------+
        |   INPUT PORTS    |
        |  (Port 1, Port 2)|
        +--------+---------+
                 |
+----------------+------------------------------------------+
|                    8-BIT BIDIRECTIONAL BUS (W BUS)        |
+---+----------+--------+--------+--------+--------+--------+
    |          |        |        |        |        |
+---+---+  +--+---+  +--+--+  +--+--+  +--+--+  +--+--+
|  MAR  |  |  PC  |  |  A  |  |  B  |  |  C  |  |  IR |
|(Mem   |  |(16-  |  |(Acc)|  |Reg B|  |Reg C|  |(Inst|
|Addr   |  | bit) |  |8-bit|  |8-bit|  |8-bit|  | Reg)|
|Reg)   |  +--+---+  +--+--+  +--+--+  +--+--+  +--+--+
+---+---+     |         |        |                   |
    |         |      +--+--------+--+                |
    |         |      |     ALU       |                |
+---+---+     |      | (ADD,SUB,AND, |                |
|MEMORY |     |      |  OR, NOT,INC) |                |
|(64KB) |     |      +------+--------+                |
+---+---+     |             |                         |
    |         |         +---+----+                    |
    |         |         | FLAGS  |                    |
    |         |         | (S, Z) |                    |
    |         |         +--------+                    |
    |         |                                       |
    |    +----+------------------------------------------+
    |    |        CONTROLLER / SEQUENCER                  |
    |    |   (Control Word, Ring Counter, Decoder)        |
    |    +------------------------------------------------+
    |
+---+---------+
| OUTPUT PORT |
|  (Port 3)   |
+-------------+

Simplified Clean Diagram:

 +-----------+     +-----------+     +-----------+
 |  INPUT    |     |  MEMORY   |     |  OUTPUT   |
 | PORTS 1,2 |     |  (64 KB)  |     |  PORT 3   |
 +-----+-----+     +-----+-----+     +-----+-----+
       |                 |                 |
=======+=========================================+======
              8-BIT BIDIRECTIONAL W-BUS
=======+====+====+====+====+====+====+====+======
       |    |    |    |    |    |    |    |
     +-+--+ +-+-+ +-+-+ +-+-+ +-+-+ +-+--+
     | MAR| | PC| | A | | B | | C | | IR |
     +--+-+ +---+ +-+-+ +-+-+ +---+ +--+-+
        |            |     |            |
    +---+---+     +--+-----+--+    +----+-------------+
    |MEMORY |     |    ALU    |    | CONTROLLER /     |
    |(64 KB)|     |(ADD, SUB, |    | SEQUENCER        |
    +-------+     | AND, OR,  |    | (control word,   |
                  | NOT, INC) |    |  ring counter,   |
                  +-----+-----+    |  decoder)        |
                        |          +------------------+
                  +-----+-----+
                  |  FLAGS    |
                  |  (S, Z)   |
                  +-----------+

How SAP-2 Differs from SAP-1 [2 Marks]

FeatureSAP-1SAP-2
Memory16 bytes, 4-bit address64 KB, 16-bit address
RegistersA and B onlyA, B, C and a temporary register
Instruction set5 instructionsMuch larger set with data transfer, arithmetic, logic, jump, call and I/O instructions
ALUAddition and subtractionAddition, subtraction, AND, OR, NOT, increment and decrement
FlagsNoneSign (S) and Zero (Z) flags, so conditional jumps are possible
Input and outputSingle output registerInput ports 1 and 2, output port 3
Program flowStraight line onlyJumps, conditional jumps and subroutine call/return
Program counter4-bit16-bit

Conclusion

SAP-2 keeps the single 8-bit W-bus architecture of SAP-1 but grows in every dimension that matters: 64 KB of memory instead of 16 bytes, more registers, a richer ALU with flags, real input and output ports, and an instruction set large enough to support branching and subroutines. Those additions are what turn SAP-1's straight-line toy machine into something that behaves like a genuine microprocessor such as the 8085.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.