assembly & computer org

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

47 Terms

1
New cards

What base is the binary number system?

Base 2

2
New cards

Convert binary 1011 to decimal

11

3
New cards

What is the result of 1 + 1 in binary?

10 (carry 1)

4
New cards

What is the 2's complement of binary 0010?

1110

5
New cards

How is overflow detected in binary addition?

When the carry into the MSB ≠ carry out of the MSB.

6
New cards

What does an AND gate output?

1 only if both inputs are 1.

7
New cards

What gate produces the opposite of its input?

NOT gate

8
New cards

What is the identity for A + 0 in Boolean algebra?

A

9
New cards

Which gate outputs 1 if inputs are different?

XOR gate

10
New cards

DeMorgans Law

A law about logical operations that describes how to negate expressions formed with and and or operations.

11
New cards

What is the key difference between combinational and sequential logic?

Sequential logic has memory (depends on past inputs)

12
New cards

What does a D flip-flop do?

Stores the value of D on the rising clock edge

13
New cards

What is the purpose of a clock in sequential circuits?

Synchronizes state changes

14
New cards

Which flip-flop toggles its state when input is 1?

T flip-flop

15
New cards

What is a register?

A group of flip-flops used to store multiple bits

16
New cards

What are the main components of the Von Neumann architecture?

CPU, memory, I/O, and a single shared bus

17
New cards

What does the Program Counter (PC) do?

Holds the address of the next instruction

18
New cards

What is the Instruction Register (IR)?

Holds the currently executing instruction

19
New cards

Define "fetch-decode-execute" cycle

The basic CPU process: get instruction, understand it, then run it

20
New cards

What is assembly language?

A low-level, human-readable form of machine code

21
New cards

What does the instruction MOV AX, BX do?

Copies the value in BX into AX

22
New cards

What is the role of a label in assembly?

Marks a location in code for jumps or branches

23
New cards

What does ADD instruction do?

Performs integer addition

24
New cards

What instruction performs an unconditional jump?

JMP

25
New cards

What is a conditional branch?

A jump that occurs only if a condition is true (e.g., JE, JNE)

26
New cards

What does CMP do in assembly?

Compares two operands by subtracting them, affecting flags

27
New cards

What is the Zero Flag (ZF) used for?

Indicates result of zero after a comparison or operation

28
New cards

What does the CALL instruction do?

Jumps to a procedure and saves return address on the stack

29
New cards

What does RET do?

Returns to the instruction after a CALL

30
New cards

What is the stack used for in procedures?

Storing return addresses, parameters, and local variables

31
New cards

What do PUSH and POP do?

Add to and remove from the stack (LIFO order)

32
New cards

What is direct addressing?

The operand holds the address of the value

33
New cards

What is immediate addressing?

The operand holds an actual value

34
New cards

What is register indirect addressing?

Address is stored in a register

35
New cards

What does MOV AX, [BX] do?

Loads into AX the value at the memory address in BX

36
New cards

What is the datapath in a CPU?

The hardware components that process data and perform operations

37
New cards

What is the Control Unit?

Directs datapath operations by generating control signals

38
New cards

What component performs arithmetic in the datapath?

ALU (Arithmetic Logic Unit)

39
New cards

What are the three main stages of instruction execution?

Fetch, Decode, Execute

40
New cards

Why do we use a memory hierarchy?

To balance speed, cost, and size of memory

41
New cards

What is the fastest memory type?

Registers

42
New cards

What type of memory stores active programs and data?

RAM (main memory)

43
New cards

What is cache memory?

A small, fast memory close to the CPU for frequently used data

44
New cards

What does DMA stand for?

Direct Memory Access

45
New cards

What is memory-mapped I/O?

I/O devices are accessed using normal memory instructions

46
New cards

What is polling in I/O?

CPU repeatedly checks device status

47
New cards

What's the benefit of interrupt-driven I/O?

CPU only acts when device signals readiness