Quiz 1 questions Flashcards

1
Q

A program is considered portable if it . . .

A

can be executed on multiple platforms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What type of tool can convert ARM Assembly to x86 Assembly?

A

Cross Assembler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Convert the following signed SWORD to a decimal value.

0010 0000 0110 1001

A

8,297

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Complete the following unsigned Hexadecimal Subtraction:

5568   - 1ADC   ------ NOTE: Represent answer as a 16-bit hex (four character) value, with no spaces or characters other than 0-9, A-F.
A

3A8C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What storage unit is the closest/fastest on the chip?

A

Registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

bus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which register is known as a loop counter?

A

ECX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the name of the lowest 8 bits of the EDX register?

A

DL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Correctly match the status flags to their description.

The carry flag
the overflow flag
the sign flag
the zero flag
the parity flag

A
  • The carry flag - Set when an unsigned arithmetic operation generates a carry (or borrow) out of the most significant bit of the result
  • The overflow flag - set when the result of a signed arithmetic operation is too large or too small to fit into the destination
  • The sign flag -set when the result of an arithmetic or logical operation generates a negative result
  • The zero flag - set when the result of an arithmetic or logical operation generates a result of zero.
  • the parity flag - set if the least-significant byte in the result contains an even number of 1 bits.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Groups of bytes in memory can only be interpreted a single way.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many bytes long is a SQWORD on x86 systems?

A

8 (with margin: 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Code labels may only appear on lines with no instructions.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Select the answer choice that best implements the following expression. Do not permit dword1, ECX, or EDX to be modified:

For reference, NEG EAX will replace the value in EAX with its two’s complement (e.g. 14d becomes -14d, or -20d becomes 20d).

eax = -dword1 + (edx - ecx) + 1

mov eax,dword1
mov edx,ebx
sub ebx,ecx
add eax,ebx
inc eax

neg dword1
mov ebx,edx
sub ebx,ecx
add eax,ebx
inc eax

mov eax,dword1
neg eax
sub edx,ecx
add eax,edx
inc eax

mov eax,dword1
neg eax
mov ebx,edx
sub ebx,ecx
add eax,ebx
inc eax

A

mov eax,dword1
neg eax
mov ebx,edx
sub ebx,ecx
add eax,ebx
inc eax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

After the following MASM code is executed:

MOV EAX, 57
MOV EBX, 50
MOV ECX, 50
ADD EAX, EBX
SUB EAX, ECX

What is the decimal value in the EAX register?
What is the decimal value in the EBX register?
What is the decimal value in the ECX register?

A

EAX - 57
EBX - 50
ECX - 50

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The following data segment starts at memory address 4100h (hexadecimal).

.data
printString BYTE “Do not add decimal to hex”,0
someBytes WORD 36 DUP(0)
moreBytes BYTE 10, 20, 30, 40, 50, 60, 70, 80, 90
questionAddr DWORD ?
ignoreMe WORD ?
What is the hexadecimal address of questionAddr?

A

416Bh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When branching in MASM, you will normally jump to ___________ .

A

a code label (representing an address in the code segment)

17
Q

Given the following data declarations and code (within main), what is printed to the console window?

(Do not include “quotations” or “Press any key to continue”, simply write out anything printed with WriteString)

.data
yes BYTE “Yes”,0
no BYTE “No”,0
maybe BYTE “Maybe: “,0

.code
MOV EAX, 13
CMP EAX, 10
JG _printMaybe

_printNo:
MOV EDX, OFFSET no
JMP _finished

_printYes:
MOV EDX, OFFSET yes
JMP _finished

_printMaybe:
MOV EDX, OFFSET maybe
CALL WriteString
CMP EAX, 15
JL _printYes
JMP _printNo
_finished:
CALL WriteString

A

Maybe: Yes

18
Q

An SDWORD storing the integer value -317,000 (FFFB29B8h) is stored in memory on a big-endian system starting at memory address α. What Hex value is stored at each of the following memory addresses?

a:
a+1:
a+2:
a+3:

A

a: FF
a+1: FB
a+2: 29
a+3: B8

19
Q

Decode the following IEEE 754 Single Precision Float (represented in hex) to its decimal value: C13B0000