Here is my questions for a quiz I have: Any help is greatly appreciated! :P iOne
ID: 3570332 • Letter: H
Question
Here is my questions for a quiz I have: Any help is greatly appreciated! :P
iOne: int8 := 1;
iFive: int8 := 5;
iTen: int8 := 10;
iFifteen: int8 := 15;
iSixteen: int8 := 16;
Furthermore, please assume there exists a label named myLabel in your source code program somewhere.
Question 1
When it manipulates the EFLAGS register, the CMP instruction performs addition.
Select one:
True
False
Question 2
An FPU register (for example, st0 or st1) has a length in bits that is equal to the length of an extended CPU register (for example, EAX or EBX).
Select one:
True
False
Question 3
The software used in this class expects the source code to be stored in a file that ends with the file extension .hla
Select one:
True
False
Question 4
On the 80x86 CPU, pointer variables are 64-bit values.
Select one:
True
False
Question 5
Consider the following quantities:
A = 268
B = 2616
C = 2610 and
D = 1011102,
Select one:
a. A is the biggest of these values
b. D is the biggest of these values
c. All of these values are equal
d. C is the biggest of these values
e. B is the biggest of these values
Question 6
When HLA Programmers use the MALLOC and FREE instructions, they are manipulating the run-time heap.
Select one:
True
False
Question 7
How many bits of stack memory are used when passing an int32 variable by-value to a function?
Select one:
a. 8
b. 0
c. 32
d. 64
e. 16
Question 8
Whenever HLA programmers use the MOV instruction, they must ensure that the source and destination variables or registers have the same size.
Select one:
True
False
Question 9
Patti the Programmer decides to create a function with three int8 parameters, sending all three by-value. Will she need to pad her functions activation record?
Select one:
a. No
b. The answer depends on the value of the parameters being passed
c. The answer depends on how many registers are preserved on the stack
d. Yes
Question 10
The numerical value 64210 can be stored in an int8 variable.
Select one:
True
False
Question 11
How many binary digits are used when representing a nibble in binary form?
Select one:
a. 4
b. 3
c. 1
d. 0
e. 2
Question 12
just like all of the other HLA commands we have learned, the MALLOC and FREE instructions are always guaranteed to execute successfully.
Select one:
True
False
Question 13
Suppose that EAX has the base address of an array a. In HLA syntax, how can you perform the following C statement:
value = a[ 6 ];
Select one:
a. mov( [ EAX ] + 6, value );
b. mov( value, [ EAX + 6 ] );
c. mov( [ EAX + 6 ], value );
d. mov( value, [ EAX ] + 6 );
e. mov( EAX + 6, value );
f. mov( value, EAX + 6 );
Question 14
On the 80x86 CPU floating-point hardware, FPU registers are 32-bits in size.
Select one:
True
False
Question 15
When HLA Programmers try to declare reference parameters as function parameters, which of the following function signatures should be used?
Select one:
a. procedure foobar( k : int8 ) @var; @nodisplay; @noframe;
b. procedure foobar( k : var int8 ); @nodisplay; @noframe;
c. procedure foobar( var k : int8 ); @nodisplay; @noframe;
d. var procedure foobar( k : int8 ); @nodisplay; @noframe;
e. Not enough information has been supplied to answer this question
Question 16
The NEG instruction operates on
Select one:
a. all unsigned data values
b. all signed data values
c. only unsigned integer data values
d. only signed integer data values
Question 17
Patti the Programmer loads the EBX register with a pointer value as shown below:
static:
iValue : int16 := 0;
dMallocAddress : dword;
begin progExample;
mov( &iValue, EBX );
malloc( @size( int8 ) );
mov( EAX, dMallocAddress );
mov( dMallocAddress, EBX );
// Patti uses [EBX]
end progExample;
After she has finished using EBX, must Patti the Programmer FREE EBX?
Select one:
a. No
b. Yes
c. It depends on the value of iValue
Question 18
The diagram below represents the various portions of an extended register in the Intel CPU processor.
If the complete colored register represents the register named EBX, what is the name for the blue portion of this register?
Select one:
a. BL
b. BX
c. BH
d. EBX
e. In the Intel CPU, the blue portion of the register diagrammed above is not referenceable by name
Question 19
The diagram below represents the various portions of a single-precision floating-point number as represented in the FPU of an Intel processor.
The green portion of this single-precision number is its
Select one:
a. mantissa bits
b. exponent bits
c. sign bit
d. Not enough information has been supplied to answer this question.
Question 20
Will the following code jump to the label myLabel?
mov( iSixteen, AH );
cmp( AH, iFifteen );
jnb myLabel;
Select one:
a. No, because jnb is for unsigned values
b. Yes
c. No, because AH cannot hold signed numbers
d. No, because jae should have been the conditional jump code used
Question 21
Sally the Programmer builds a nice new HLA function that she shares with you to compute the average value stored in an array. She claims she tested it and that it works perfectly.
When you use it, you notice after calling her function that all your computations start breaking. What do think is likely to be causing your problem?
Answer:
Explanation / Answer
Question 1: False
Explanation : CMP instruction performs subtraction. So, no need to manipulate EFLAG register.
Question 2: False
Explanation : the length of an extended CPU register will be double of FPU register. Extended CPU maps the lower byte into upper byte.
Question 3: False
Explanation : The file with extension .hla is not used in microprocessor 8086.
Question 4: False
Explanation : On 80X86 CPU, pointer variables are of 32 bits. So, its false.
Question 5: (b) D is the biggest of these values
Explanation : If we take all the numbers as Hexadecimal or decimal, in each case the value od D variable will be the biggest.
Question 6: True
Explanation : When MALLOC and FREE instructions are used, a run-time heap is manipulated.
Question 7: (A) 8
Explanation : Stack size is 4 and we need to store 32 bits. So, 32/4=8.
Question 8: True
Explanation : At the source and destination registers will have the same size because if the size will not be same, MOV instruction will not copy the contents. Thus, it is true.
Question 9: (D) Yes
Explanation : Whenever we pass a parameter in a function, each time we need to pad the function activation record. Thus it is true.
Question 10: False
Explanation : int8 variable can store only -128 to 127 range values. Thus, int8 is unable to store this large value. Thus, it is false.
Note: We are permitted to give the answers of first 10 questions only. So, I attempted only first 10 questions.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.