Computer Architecture 2: Assembly Language
18 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the name of the language that the computer understands?

Machine Language

What is the name of the language that is close the machine language and uses a symbolic code?

Assembly language

What is the name of the program that converts Assembly language to machine language?

Assembler

Assembly Language is harder to learn than machine language

<p>False (B)</p> Signup and view all the answers

What are the four fields of programming?

<p>Name, Operation, Operand, Comments</p> Signup and view all the answers

The 'Comments' field in a program instruction helps the programmer to understand the code.

<p>True (A)</p> Signup and view all the answers

What are the types of instructions used in Assembly language?

<p>Micro instructions and Pseudo-operations</p> Signup and view all the answers

What does MOV operation do?

<p>It moves data from one location to another</p> Signup and view all the answers

What does the ADD operation do?

<p>It adds the contents of two operands and stores the result in the destination operand. The add operation can combine data from a register or a memory location</p> Signup and view all the answers

The XLAT instruction is used to simplify lookup tables.

<p>True (A)</p> Signup and view all the answers

The MUL and DIV operations do not affect the Carry Flag.

<p>False (B)</p> Signup and view all the answers

What are the logical operations that are supported by the Assembly language?

<p>AND, OR, XOR, NOT</p> Signup and view all the answers

The AND operation, in Assembly language, checks to see if both bits are 1.

<p>True (A)</p> Signup and view all the answers

The OR operation, in Assembly language, checks to see if at least one of the bits is 1.

<p>True (A)</p> Signup and view all the answers

The XOR operation, in Assembly language, checks to see if both bits are different.

<p>True (A)</p> Signup and view all the answers

The NOT operation, in Assembly language, inverts all the bits.

<p>True (A)</p> Signup and view all the answers

The Carry Flag is only set by the DIV instruction.

<p>False (B)</p> Signup and view all the answers

The Overflow Flag is set when there is an overflow in a byte or word operation.

<p>True (A)</p> Signup and view all the answers

Flashcards

Assembly language

A programming language that is close to machine language, using symbols and mnemonics to represent instructions.

Machine language

The language that a computer directly understands and executes. It's based on binary code (0s and 1s).

Assembler

A program that translates assembly language code into machine language. It's the assembler's job to make assembly code understandable by the computer.

Source program

The assembly language code that you write, the original code before it's translated.

Signup and view all the flashcards

Object program

The machine language code generated by the assembler from the source program, the code the computer can run directly.

Signup and view all the flashcards

MOV (Move) instruction

A fundamental instruction in assembly language that tells the processor to move data from one location to another. It's like copying information.

Signup and view all the flashcards

Pseudo-instruction

A type of assembly language instruction designed for programmers to add comments and notes to their code without affecting the code's execution.

Signup and view all the flashcards

Micro-instruction

A specific instruction that the assembler translates directly into machine language, unlike pseudo-instructions.

Signup and view all the flashcards

Accumulator (AX)

A special register in a computer's CPU that's often used for calculations, especially additions and subtractions.

Signup and view all the flashcards

Arithmetic instructions

Assembly language instructions that perform mathematical operations like addition, subtraction, incrementing, decrementing, and negation.

Signup and view all the flashcards

ADD instruction

An instruction that adds the contents of a source operand to a destination operand, and stores the result in the destination.

Signup and view all the flashcards

SUB instruction

An instruction that subtracts the contents of a source operand from a destination operand and stores the result in the destination.

Signup and view all the flashcards

INC (Increment) instruction

An instruction that increments the value of a destination operand by 1.

Signup and view all the flashcards

DEC (Decrement) instruction

An instruction that decrements the value of a destination operand by 1.

Signup and view all the flashcards

NEG (Negate) instruction

An instruction that negates the value of a destination operand (changes the sign from positive to negative or vice versa).

Signup and view all the flashcards

Carry Flag (CF)

A special bit in the CPU's status register that indicates whether the result of an arithmetic operation caused a carry-over (overflow) to a higher digit place.

Signup and view all the flashcards

Parity Flag (PF)

A special bit in the CPU's status register that indicates whether the result of an operation generated an odd or even number of set bits.

Signup and view all the flashcards

ADC (Add with Carry) instruction

An instruction that adds the contents of a source operand to a destination operand, and then adds the value of the Carry Flag (CF) to the result.

Signup and view all the flashcards

SBB (Subtract with Borrow) instruction

An instruction that subtracts the contents of a source operand from a destination operand, and then subtracts the value of the Carry Flag (CF) from the result.

Signup and view all the flashcards

XCHG (Exchange) instruction

An instruction that swaps the contents of two operands. It's like exchanging the values in two containers.

Signup and view all the flashcards

XLAT (Translate) instruction

An instruction designed to perform table lookups. It uses a base address (BX), a value in AL, and a displacement (DS*16+BX) to locate a specific entry in a lookup table.

Signup and view all the flashcards

Logical instructions

Assembly language instructions that perform logical operations on data, such as AND, OR, XOR, and NOT.

Signup and view all the flashcards

AND operation

A logical operation that compares two operands, bit by bit. If both bits are set (1), the result is 1. Otherwise, the result is 0.

Signup and view all the flashcards

OR operation

A logical operation that compares two operands, bit by bit. If at least one bit is set (1), the result is 1. Otherwise, the result is 0.

Signup and view all the flashcards

XOR (Exclusive OR) operation

A logical operation that compares two operands, bit By bit. If the bits are different, the result is 1. Otherwise, the result is 0.

Signup and view all the flashcards

NOT operation

A logical operation that inverts the bits of an operand, changing 0s to 1s and 1s to 0s.

Signup and view all the flashcards

Multiplication and division instructions

Assembly language instructions that perform multiplication and division operations.

Signup and view all the flashcards

MUL (Multiply) instruction

An instruction that multiplies two operands and stores the result in a specific register. It's designed for multiplying small numbers.

Signup and view all the flashcards

DIV (Divide) instruction

An instruction that divides two operands and stores the quotient and remainder in designated registers. It's designed for dividing larger numbers.

Signup and view all the flashcards

Study Notes

Computer Architecture Course Notes

  • Course Title: Computer Architecture 2
  • Instructor: Dr. Rouda Mahebany
  • Course Description: This course covers the fundamental concepts of computer architecture, focusing on assembly language instructions.
  • This course is in the second year of information engineering.

Assembly Language Instructions

  • Machine Language: The language directly understood and executed by the computer, using binary code (0s and 1s). It's complex and difficult for humans to write directly.
  • Assembly Language: A symbolic representation of machine language using mnemonics (short codes). This makes the code easier to read, write, and understand for programmers.
  • Assembler: A program that translates assembly language into machine language.

Mnemonics and Operations

  • ADD: Adds two operands.
  • SUB: Subtracts two operands.
  • MOV: Copies data from a source to a destination.
  • INC: Increments a value by one.
  • DEC: Decrements a value by one.
  • ADC: Adds two operands and carries (for multi-byte operations).
  • SBB: Subtracts two operands considering borrowing.

Data Types and Registers

  • Byte: Single-byte data.
  • Word: Two-byte data (16-bit).
  • Registers: Special memory locations to store data and intermediate results. Specific registers are often used for specific calculations.

Directives (Pseudo-Ops)

  • Pseudo-operations: Instructions that tell the assembler to perform tasks like defining variables, allocating memory, or defining procedures. They are not translated into machine code.

XLAT Instruction

  • XLAT: A lookup table instruction. It retrieves a value from a table in memory based on the content of the AL register.

Data Movement Operations

  • The MOV instruction is used to move data from one location to another (registers, memory locations, or constants). The source location remains unchanged.
  • Data movement operations involve transferring values between registers, memory locations, or between a register and a memory location.

Arithmetic Operations

  • A variety of addition and subtraction operations are presented with the rules on use of the various operations.
  • Data transfer and arithmetic operations are essential components of assembly language programming.

Logical Operations

  • Logical instructions (AND, OR, XOR, NOT) perform logical operations on bits.
  • Logical operations operate on the values of operands in bit-level operations, rather than calculations involving numerical values.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Test your knowledge on the fundamental concepts of computer architecture, particularly focusing on assembly language instructions. Explore the differences between machine language and assembly language, and familiarize yourself with common mnemonics used in programming. This quiz is suitable for second-year information engineering students.

More Like This

Assembly Language in Intel 8086 Architecture
22 questions
Assembly Language and Computer Structure
16 questions
8085 Assembly Language Programming
80 questions
Use Quizgecko on...
Browser
Browser