logo

2. Digital Logic and Microprocessor (AExE02)

Computer Engineering - Nec (Nepal Engineering Council)

No MCQ questions available for this chapter.

2.1 Digital Logic (AExE0201)

  1. Number Systems

    • Binary (Base-2): Uses digits 0 and 1.
    • Octal (Base-8): Uses digits 0-7.
    • Decimal (Base-10): Uses digits 0-9.
    • Hexadecimal (Base-16): Uses digits 0-9 and letters A-F.
  2. Logic Levels

    • High (1) and Low (0) represent binary states.
    • Voltage levels define these states (e.g., TTL uses 0V as Low and +5V as High).
  3. Logic Gates

    • Basic Gates: AND, OR, NOT.
    • Universal Gates: NAND, NOR.
    • Other Gates: XOR, XNOR.
  4. Boolean Algebra

    • Laws: Commutative, Associative, Distributive, Identity, Null, Inverse.
    • Simplification techniques.
  5. Sum-of-Products (SOP) Method

    • Logical expressions expressed as a sum (OR) of product terms (AND).
  6. Product-of-Sums (POS) Method

    • Logical expressions expressed as a product (AND) of sum terms (OR).
  7. Truth Table to Karnaugh Map (K-Map)

    • Simplifies Boolean expressions to reduce circuit complexity.
    • Groups adjacent 1's in a grid to form simplified expressions.

2.2 Combinational and Arithmetic Circuits (AExE0202)

  1. Combinational Circuits

    • Output depends only on current inputs.
  2. Multiplexer (MUX)

    • Combines multiple inputs into one output based on select lines.
  3. Demultiplexer (DEMUX)

    • Splits one input into multiple outputs based on select lines.
  4. Decoder and Encoder

    • Decoder: Converts n-bit input into 2ⁿ unique outputs.
    • Encoder: Converts 2ⁿ inputs into n-bit output.
  5. Arithmetic Operations

    • Binary Addition and Subtraction using logic gates.
    • Operations on Unsigned and Signed Binary Numbers (e.g., 2’s complement for signed subtraction).

2.3 Sequential Logic Circuit (AExE0203)

  1. Flip-Flops

    • RS Flip-Flop: Stores 1-bit data. Basic bistable element.
    • Gated Flip-Flop: Controlled by enable input.
    • Edge-Triggered Flip-Flop: Activates on clock edge.
    • Master-Slave Flip-Flop: Two stages (Master captures input; Slave updates output).
  2. Registers

    • Types: Shift Registers (Serial-In-Serial-Out, Serial-In-Parallel-Out, etc.).
    • Applications: Data storage, transfer, and manipulation.
  3. Counters

    • Asynchronous Counters: Ripple effect; slower but simpler.
    • Synchronous Counters: All bits change simultaneously; faster and more reliable.

2.4 Microprocessor (AExE0204)

  1. Internal Architecture

    • ALU, Control Unit, Registers, Buses (Data, Address, Control).
    • Clock for synchronization.
  2. Features

    • Speed (measured in MHz/GHz), word length, power consumption, instruction set.
  3. Assembly Language Programming

    • Low-level language close to machine code.
    • Use of mnemonics (e.g., MOV, ADD, SUB).

2.5 Microprocessor System (AExE0205)

  1. Memory Device Classification and Hierarchy

    • Types: Primary (RAM, ROM), Secondary (HDD, SSD), Cache, and Registers.
    • Hierarchy: Registers > Cache > RAM > Secondary Storage.
  2. I/O and Memory Interfacing

    • Parallel Interface: Transmits multiple bits simultaneously.
    • Serial Interface: Transmits data bit by bit (e.g., UART, SPI).
  3. Programmable Peripheral Interface (PPI)

    • Example: Intel 8255 for interfacing peripherals.
  4. Transmission Methods

    • Synchronous: Data transferred in sync with clock.
    • Asynchronous: No fixed clock signal; uses start and stop bits.
  5. Direct Memory Access (DMA)

    • Bypasses CPU for high-speed data transfer between memory and peripherals.
    • DMA Controllers: Manage data transfer independently.

2.6 Interrupt Operations (AExE0206)

  1. Interrupt

    • External or internal signal to CPU requesting attention.
  2. Interrupt Service Routine (ISR)

    • Special code executed in response to an interrupt.
  3. Interrupt Processing

    • Steps: Save current state, execute ISR, restore state, resume normal operation.