CS 271 Module 1 Summary Exercises

¡Supera tus tareas y exámenes ahora con Quizwiz!

Compared to higher-level languages, which of the following are benefits of Assembly Language programming? (Check all that apply) - Ease of Use - Integrated Tools - Hands-on Code Optimization - Direct Manipulation of Memory - Intuitive Programs

- Hands-on Code Optimization - Direct Manipulation of Memory

Which of the following are components of the Control Unit? (Check all that apply) - Multi-Purpose Registers - Instruction Pointer - Status Register - Instruction Register - ALU

- Instruction Pointer - Status Register - Instruction Register

In the IA-32 architecture, which of the following are valid 16-bit register references? - AH - BL - CX - ESI - SP - SS

- SP - CX - SS

What is the range of decimal values for a signed BYTE? -127 to 128 -128 to 128 -127 to 127 -128 to 127

-128 to 127

What is the range of decimal values for an unsigned DWORD? 0 to 4,294,967,296 -2,147,483,648 to 2,147,483,648 0 to 4,294,967,295 -2,147,483,648 to 2,147,483,647

0 to 4,294,967,295

Complete the following unsigned Binary Subtraction: 0111 0000 - 0110 1110 ----------

0000 0010

Which of the following binary values is equivalent to hexadecimal 4A2B? 0100 1010 1010 1011 0100 1010 0010 1011 0100 1010 0010 1101 0110 1011 0010 1001

0100 1010 0010 1011

Complete the following unsigned Binary Subtraction: 1100 1000 - 0110 0100 ----------

0110 0100

Which of the following binary values is equivalent to hexadecimal 7CBE? 0111 1011 1011 1100 0111 1101 1011 1110 0111 1100 1100 1110 0111 1100 1011 1110

0111 1100 1011 1110

Complete the following Unsigned Binary Addition (answers should also be in Binary): 1011 1010 + 1010 0001 ----------

1 0101 1011

How many bits long is a WORD on x86 systems?

16

Convert the following signed SWORD to a decimal value. 0011 1111 1010 1011

16,299

What is the largest unsigned integer that may be stored in 24 bits? 65,536 1,048,576 32,767 16,777,215

16,777,215

Complete the following unsigned Hexadecimal Subtraction: C48A - AACC ------

19BE

Complete the following unsigned Hexadecimal Subtraction: C6F1 - A735 ------

1FBC

How much memory can be addressed in Real-address mode? - 640K - 16MB - 4GB - 1MB

1MB

Which list contains the correct hexadecimal translation (in order) of the following unsigned decimal integers: 33, 95, 257 21, 5F, 101 21, 62, 103 22, 5E, 11A 6A, 5F, 101

21, 5F, 101

What is the largest signed integer that may be stored in 32 bits? 231 - 1 231 232 232 - 1

231 - 1

Convert the following unsigned WORD to a decimal value. 1011 1110 0100 1011

48,715

Convert the following string into its ASCII hex representation: Science Don't use 0x or h to represent the hex values. For example, the ASCII hex representation for "1+z" is 31 2B 7A

53 63 69 65 6E 63 65

Convert the following unsigned WORD to a decimal value. 1111 1010 0000 1111

64,015

Convert the following signed SWORD to a decimal value. 0010 0000 0110 1001

8,297

Complete the following Unsigned Hexadecimal Addition (answers should also be in Hexadecimal): 2C26 + 572B ------

8,351

Complete the following Unsigned Hexadecimal Addition (answers should also be in Hexadecimal): 2C27 + 573B ------

8362

What unit on a CPU chip is responsible for computing basic addition and subtraction operations? - Control Unit - ALU - I/O - FPU

ALU

What mechanism is used to turn Assembly Language code to Machine Code? - Compiler - Translator - Cross Compiler - Assembler

Assembler

Convert the following ASCII hex representation to a character string: 43 6F 6D 70 75 74 65 72 Do not add any spaces. For example, the hex 31 2B 7A represents the string: 1+z

Computer

What type of tool can convert ARM Assembly to x86 Assembly? - Cross Assembler - Linker - Loader - Cross Compiler

Cross Assembler

If an integer's sign bit is 1, the integer is positive. (True/False)

False

The ASCII code values for alphabetic letters (e.g. 'a') are smaller than for decimal digits (e.g. '1'). (True/False)

False

The CPU clock cycle length is the only contributing factor to the speed of operations on a computer. (True/False)

False

The Stack Segment register always points to the top of the runtime stack. (True/False)

False

Convert the following ASCII hex representation to a character string: 46 6C 6F 61 74 69 6E 67 Do not add any spaces. For example, the hex 31 2B 7A represents the string: 1+z

Floating

An Assembly Language is defined by the . . . - Assembler (e.g. MASM) - Language Hierarchy Level - Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA)

Language Hierarchy: Rank the following languages from low level (1) to high level (4). - Machine Code - English - ARM Assembly - Python

Level 4 (Highest Level): English Level 3: Python Level 2: ARM Assembly Level 1 (Lowest level): Machine Code

Parity flag

Status flag that is set if the least-significant byte in the result contains an even number of 1 bits

Carry flag

Status flag that is set when an unsigned arithmetic operation generates a carry (or borrow) out of the most significant bit of the result

Overflow flag

Status flag that is set when the result of a signed arithmetic operation is too large or too small to fit into the destination

Sign flag

Status flag that is set when the result of an arithmetic or logical operation generates a negative result

Zero flag

Status flag that is set when the result of an arithmetic or logical operation generates a result of zero

Put the Instruction Execution steps in the correct order: - If the output operand is in memory, the control unit uses a write operation to store the data. - The control unit increments the Instruction Pointer (IP, also known as instruction counter) - The control unit fetches the next instruction from the instruction queue. - The ALU executes the instruction using the named registers and internal registers as operands. - If the instruction uses an input operand located in memory, the control unit uses a read operation to retrieve the operand and copy it into internal registers. - The control unit decodes the instruction's function to determine what the instruction will do.

Step 1: The control unit fetches the next instruction from the instruction queue. Step 2: The control unit increments the Instruction Pointer (IP, also known as instruction counter) Step 3: The control unit decodes the instruction's function to determine what the instruction will do. Step 4: If the instruction uses an input operand located in memory, the control unit uses a read operation to retrieve the operand and copy it into internal registers. Step 5: The ALU executes the instruction using the named registers and internal registers as operands. Step 6: If the output operand is in memory, the control unit uses a write operation to store the data.

Adding 7Fh and 05h in an 8-bit register sets the Overflow flag. (True/False)

True

In a Von Neumann architecture, each instruction in a program may be individually addressed and accessed. (True/False)

True

The linker combines object files into an executable file. (True/False)

True

The status flags are implemented as individual bits within the Status & Control Register. (True/False)

True

A ______ is a set of parallel wires used to conduct a group of electrical signals simultaneously.

bus

The three types of buses connected to the CPU are: - fetch-decode, control, execution - data, system, address - data, address, control - address, control, memory

data, address, control

During which phase of the instruction execution cycle is the instruction pointer incremented? - fetch - execute - operand fetch - decode

fetch

A signed integer stores the sign in the ___________________.

most significant bit (MSB)

Which of the following best describes the relationship from assembly language instructions to machine language instructions? - nearly one to one - many to one - many to many - one to many

nearly one to one

A __________ is a container for data which resides on the CPU chip.

register

The two's complement of an binary value is formed by which process? - changing the highest bit to a 1 - adding 2 and reversing the bits - adding 1 and reversing the bits - reversing (inverting) the bits and adding 1

reversing (inverting) the bits and adding 1


Conjuntos de estudio relacionados

Psychology Module 51,52,53 Test (12/5/18)

View Set

Fundamentals - Exam 1 (CH 48) Study Guide

View Set

EMT Test Prep Chapters 1-6 plus BLS

View Set