Home
Subjects
Expert solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
CDA 3100 Exam 1, CDA 3100 Test #2
Flashcards
Learn
Test
Match
Flashcards
Learn
Test
Match
Terms in this set (162)
Great Architecture Ideas: The idea that anticipates the capability of new technology and when it can be used is:
Design for Moore's Law
Great Architecture Ideas: The idea that hides lower-level details so that they can be hidden to provide simpler models is called:
Use abstraction to simplify design
Great Architecture Ideas: The most efficient method to obtain improvements is to:
Make the common case fast
Great Architecture Ideas: Improving performance by doing multiple operations at the same time is called:
Improve performance via parallelism
Great Architecture Ideas: The idea that is commonly used to improve instruction throughput is:
Improve performance via pipelining
Great Architecture Ideas: Sometimes it's faster to assume a particular result when waiting until the result is known. Also known as speculation and is used to guess results of branches this idea is known as:
Improve performance via prediction
Great Architecture Ideas: The idea that allows most of the accesses to be caught at the rest level and be able to retain most of the information at the last level is called:
hierarchy of memories or use of hierarchy of memories
Great Architecture Ideas: The idea that allows architecture to detect and correct errors is called:
redundancy or improve performance via redundancy
Computer "A" takes 10 seconds to execute a program
Computer "B" takes 15 seconds to execute the same program.
How many times faster is Computer "A" than computer "B"?
1.5
The duration of a Clock Cycle is called:
Clock period
The cycles per second is called:
frequency or clock frequency
You are given a processor that has a clock period of 4 Picoseconds. What is its Frequency in Gigahertz?
250
What is the largest unsigned (positive) number you can represent with 5 bits:
31
Convert the decimal (base 10) number 134 into an 8 bit binary number.
1000 0110
Convert the decimal (base 10) number 21 into an 8 bit binary number
0001 0101
Convert the decimal (base 10) number 100 into an 8 bit binary number.
0110 0100
Convert the decimal (base 10) number 255 into an 8 bit number.
1111 1111
Convert the binary (base 2) unsigned number 10010110 into decimal (base 10)
150
Convert the number 10.125 to a binary number. Use only the number of bits necessary and remember to place the decimal properly.
1010.001
Convert 111110100001 into a three place Hex number.
FA1
Convert 111110100001 into a four place Octal number.
7641
Convert the decimal (base 20) number 255.0625 in IEEE 32 bit Hexadecimal Value in the form 0x00000000
0x437F1000
Convert the decimal (base 20) number -125.125 in IEEE 32 bit Hexadecimal Value in the form 0x00000000
0xC2FA4000
Take the IEEE 754 Hexadecimal number 0xc18a0000 and convert it back into a base 10 number with sign.
-17.25
What is the largest negative number that you can represent in two's complement with 8 bits?
128
Take the decimal number -18 and convert it into an 8 bit signed two-complement number.
1110 1110
The two's complement method of representing negative numbers internally inside of modern computers. Which one of these is not true?
You can represent the same number of negative and positive values.
The numbers below represent 8 bit signed numbers. Negative numbers are represented using two's complement. Add the numbers together and give the 8 bit results.
0 1 1 1 1 1 1 1
+ 1 0 0 0 0 0 0 0
0000 0000
The first number 01111111 represents a positive 127 while the second number 10000001 represents a -127. So when they are added together they would represent the number zero. Overflow is not possible since we are adding and both are valid numbers and are of different sign."
The numbers below represent 8 bit signed numbers. Negative numbers are represented using two's complement. When added together, does this result in an overflow/underflow operation?0 1 1 1 1 1 1 1
+ 0 0 0 0 0 0 0 1
True - added two positive numbers and came up with a negative.
When adding two numbers together, let us say A + B, if A is greater than or equal to zero and B is greater than or equal to zero, what results would indicate an overflow?
If the results were less than zero.
What is the affect of shifting an integer to the left by one bit?
Multiplying the number by 2
Convert the following 16 bit signed binary (base 2) number into decimal (base 10). Leave off any leading zeros include the sign if it is negative.
1000 0011 1001 1111
-31,841
Convert the following 16 bit signed binary (base 2) number into decimal (base 10). Leave off any leading zeros include the sign if it is negative.
0000 1000 1001 1110
2,206
Convert the following decimal (base 10) signed number into its'16 bit two's compliment equivalent.-3,278
1111 0011 0011 0010
Write 3278 in binary (to 16 bits)
flip all bits
add 1
Convert the following decimal (base 10) number into its' hexadecimal equivalent
13
D
What would the Octal (base 8) number be for the Hexadecimal number 1AF?
0657
The two's compliment method of representing negative numbers has the following advantages:
It has only one value for zero and it is easy to implement in hardware.
What does RISC stand for?
Reduced Instruction Set Computer
Which one of the following is a principle of RISC?
Load-store instruction sets
RISC incorporates several of the principles of the 8 Great Architecture ideas. One of them is that Make the Common Case __________________.
Faster
How many general purpose registers are available in MIPS Assembly?
32
Each MIPS Assembly line can contain:
A directive, and instruction plus a comment
A label in MIPS Assembly must__________________
Be the first thing on a line and end in a semicolon (:).
A MIPS assembly program has two parts. The first part contains the data and is identified by the ________ directive.
.data
The __________ directive tells the MIPS assembly program that starting point of the program.
.globl
The __________ directive allows you to allocate memory 32 bits or 4 bytes at a time.
.word
The __________ directive places a null terminator at the end of the a declared character string.
.byte
What does the following instruction perform?
li $s1,10
Loads the integer value of 10 into register $s1
What is the value of Register $s1 after the following set of instructions?
li $s1,10
addiu $s1,$s1,10
20
What is the difference between the ADD and ADDU instruction?
The ADDU allows negative numbers but does not check for overflow.
Why is there no Subtract Immediate in MIPS?
It would be redundant because you can add negative immediate numbers using the ADDI or ADDIU instruction.
What is the result of the following Code Segment?
.data
MSG1: .asciiz "Hello Word"
.text
.globl main
main: li $v0,4
la $a0,MSG1
syscall
jr $ra
Prints Hello World
What is the purpose of the Line #8 in the following Code Segment?
.data
MSG1: .asciiz "Hello Word"
.text
.globl main
main: li $v0,4
la $a0,MSG1
syscall
jr $ra <---
Returns control to the operating system or stops the program
What is the purpose of line #6?
.data
MSG1: .asciiz "Hello Word"
.text
.globl main
main: li $v0,4
la $a0,MSG1 <-----
syscall
jr $ra
Put the address of MSG1 into register $a0
What value will be contained in Register $s1 after the following code segment?
li $s1,10
li $s2,3
div $s1,$s2
mvhi $s1
1
What value will be contained in Register $s1 after the following code segment?
li $s1,10
li $s2,3
mul $s1,$s1,$s2
30
Assume that you have a variable declared called NUM1 below. How would you load that value into register $t1?
NUM1: .word 100
lw $t1,NUM1
Match the service code that is loaded into register $v0 with the description of the service.
1
Print Integer
Match the service code that is loaded into register $v0 with the description of the service.
2
Print Single Floating Point Number
Match the service code that is loaded into register $v0 with the description of the service.
3
Print Double Floating Point number
Match the service code that is loaded into register $v0 with the description of the service.
4
Print String
Match the service code that is loaded into register $v0 with the description of the service.
5
Read an Integer
Match the service code that is loaded into register $v0 with the description of the service.
6
Read a Single Floating Point number
Match the service code that is loaded into register $v0 with the description of the service.
7
Read a Double Floating Point Number
Match the service code that is loaded into register $v0 with the description of the service.
8
Read a string
Match the service code that is loaded into register $v0 with the description of the service.
10
Exit the program
Match the service code that is loaded into register $v0 with the description of the service.
11
Print a character
What does the $gp or register 28 do?
Points to the middle of the 64K of memory in the static data segment
When printing an integer, the number to be printed must be loaded into which register?
$a0
Registers $a0 through $a1 are generally used for ____________.
First four parameters of a subroutine call
To print a string, the address of the string must be loaded into what register?
$a0
When reading an integer, the results of the read operation (if successful) will place the value into which register?
$v0
Which registers are used to pass and return floating point values?
$f0 and $f12
The $sp register contains the _____________.
stack pointer
Which register always contains the value 0 (zero)?
$zero or 0
What is the function of the following instruction?
slt $s1,$s2,$s3
Checks to see if the contents of $s2 is less than $s3 and if so sets $s1 to 1 else it sets $s1 to zero.
What will be the result of the following code segment?
li $s1,10
bne $s1,$zero,done
add $s1,$s1,$zero
The Program Counter will be updated with the address of the label done.
The 16 bit immediate field in the branch instruction must have the following operation performed before it can be used. Which are they?
Shift left 2 positions, extended to 32 bits, and added to the PC+4
The jr or Jump Register instruction allows the programmer which of the following?
A flexible branch to a location specified by a register that can be modified during run-time
What is the difference between a jump and a branch instruction?
A branch instruction is based on the difference from the next intruction (PC+4) while the Jimp is an absolute address
The jal or jalr instruction is used most often to do which of the following?
Call a subroutine
What us the format of the slt instruction?
slt rd, rs, rt
The bge, bgt, ble, la, li, move, and nop instructions are all called ________ instructions because they are composed of more than one actual mips instructions
pseudo
What is the difference between the following instructions?
#Question set 1
beq $s1,$zero,done
#Question set 2
beqz $s1,done
#Question set 3
li $s2,0
beq $s1,S2,done
None
Which of the following code segments will loop exactly 10 times?
example 1: li $s1,10
top: begz $s1,done
.
.
addiu $s1,$s1,-1
j top
done:
example 2: li $s1,9
top: blt $s1,$zero, done
.
.
addiu $s1,$s1,-1
j top
done:
example 3: li $s1,10
top: addiu $s1,$s1,-1
.
.
bne . $s1,$zero, top
All three
Match the items on the left with those on the right. Assembly Directives:
.asciiz str
store the string in memory with a null terminator
.ascii str
store the string in memory but not null-terminated
.byte b1,b2,b3,...bn
store values in successive bytes of memory
.word w1,w2,w3,....wn
store the n 32 bit items in memory
.double d1,d2,d3,.....dn
store the n items as double precision floating point number
.float f1,f2,f3,.....fn
store the n items as single precision floating point number
.half h1,h2,h3,.....hn
store n items as 16 bit value
.space n
Allocate n number of bytes in consecutive storage locations
.align n
align next address on a boundary. If n=2 it is a full word boundary
.globl sym
declares the label sym as a global that can be referenced from other files
Given the code below, which of the commands below will load the 4th full word contents into register $s1.
array .space 100
.
.
la $s2,array
lw $s1,12($s2)
(4th word starts at 12)
Which command returns from a called function?
jr $ra
Finish the line of code to load a single byte of memory from a storage location called array into register $s1.
la $s2,array
lw $s1,________
array
Before calling a function with the jal or jalr command you must at least perform which of the following:
Allocate at least 1 word of memory from the stack and save the $ra register.
Finish the line of code to store a single byte of memory from a storage location called array from register $s1.
la $s2,array
sw $s1,________
array
Which command aligns the next line of code on a full word boundary?
.align 2
What function does the following line of code perform?
addiu $sp,$sp,-32
Sets aside 32 bytes of 8 words of memory from the stack pointer
What does the lui operation perform.
Load 16 bytes from the immediate field into the upper part of the register
Which of the following lines of code is a valid for the Load halfword unsigned operation?
lh $s2,array
Questions 1-3 are based on converting the number -121.0625 into a IEEE 754 32 bit Floating Point Format.
What is the normalized binary mantissa or fraction portion of the IEEE 754 version of the floating point value for -121.0625? ( Make sure it is 23 bits)
11100100010000000000000
Questions 1-3 are based on converting the number -121.0625 into a IEEE 754 32 bit Floating Point Format.
What is the binary Exponent portion of the IEEE 754 version of the floating point value for -121.0625? ( Make sure it is 8 bits).
10000101
Questions 1-3 are based on converting the number -121.0625 into a IEEE 754 32 bit Floating Point Format.
What is the Hexadecimal value of the IEEE 754 version of the floating point value for -121.0625?
0xc2f22000
Given the IEEE754 number 0x41280000, what is the sign?
Positive
Given the IEEE754 number 0x41280000, What is the decimal (Base 10) value:
10.5
What is meant by normalizing when converting a number to IEEE 754 format?
Move the decimal place to the right of the left most one and discard the one.
In the Multiplication simulation, the Multiplicand is added to the Product when?
When the right most bit of the multiplier is a one (1).
How many steps are there in the multiplication simulation if there are 6 binary digits?
6
How do you know when to shift the quotient left and append a one (1) to the right most bit?
When the result of the Remainder - Divisor is not negative.
How many steps are there in the Division Simulation for a 6 bit value?
7
3 bit Grey Codes in order
1. 000
2. 001
3. 011
4. 010
5. 110
6. 111
7. 101
8. 100
The logical AND gate has a truth table such that given two input A and B, the result of A AND B is 1 if and only if:
Both A and B is 1
The logical OR gate has a truth table such that given two input A and B, the result of A OR B is one if and only if:
Either A or B is 1 or if both A and B is 1
The Exclusive Or gate is unique and very important in Computer Science. The Truth Table of the Exclusive Or gate is such that given an input A and B, the XOR gate produces a 1 if and only if:
Either A or B are 1 but not both
Look at the following image. What does it represent?(It's a 2-4 Decoder. Look up a 2-4 Decoder)
2-4 Decoder
The image below is an example of what:(It's a 2 Input Multiplexer. Look up a 2 Input Multiplexer.
2 Input Multiplexer
The image below is an example of which?(It's a Program Logic Array.)
Program Logic Array
Identity Law
A+0=A and A*1=A
Zero and One Laws
A*0=0 and A+1 =1
Inverse Laws
A+A'=A and A*A' =0
Idempotent Laws
A + A = A and A*A = A
Double Negation Law
A'' = A
Absorption Laws
A(A+B) = A and A+(AB) = A
Commutative Laws
A+B=B+A and AB=BA
Associative Laws
A+(B+C) = (A+B)+C andA(BC) = (AB)C
Distributive Laws
A(B+C) = AB + A*C
DeMorgan's Law
(A+B)' = A'B' or (AB)' = A'+B'
Which one of the following equations is in Sum-Of-Products form?
(AB) + (A'B')
Modern day computers are built entirely using either NAND or NO gates. Which one of the Great Architecture Principles does this illustrate?
Make the simple case fast
A pipeline has five stages. Use all lower case letters and put them in order of execution.
Stage 1: instruction fetch
Stage 2: register read
Stage 3: ALU Operation
Stage 4: data access
Stage 5: register write
Consider the following set of instructions:
lw $10,20($1)
sub $11, $2, $3
add $12, $3, $4
lw $13, 24($1)
add $14, $5, $6
How many clock cycle will it take to finish this sequence in a pipeline architecture?
9
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
RegDest
The register file destination number for the Write register comes from the rt field.
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
RegWrite
None
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
ALUSrc
The first ALU operand is Read Data 2.
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
PCSrc
PC is replaced by PC+4
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
MemRead
None
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
MemWrite
None
Match the left side and the right side. Match the 1 bit signal on the left w/ the affect of Deasserting it on the right.
MemToReg
The value fed to the register file is from the ALU
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
RegDst
The register file destination number for the Write register comes from the rd field.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
RegWrite
Write register is written with the value of the Write data input.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
ALUSrc
The first ALU operand is sign-ext immediate field.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
PCSrc
PC is replaced by branch target.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
MEMRead
Content of memory at the location specified by the Address input is put on the Memory data output.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
MEMWrite
The Write Data input is written to the Address input.
Match the left side and the right side. Match the 1 bit signal on the left with the affect of Asserting it on the right.
MemToReg
The value fed to the register file input comes from Memory.
Let's take a look at the following instruction sequence. sub $2, $1, $3
and $12, $2, $5
or $13, $6, $2
add $14, $2, $2
sw $14, 100($2)
What is the hazard?
The last four instructions is $2 which is written in the first instruction.
What is the definition of temporal locality?
Items that are referenced often should be made available.
What is the definition of spatial locality?
Reference items that are close to each other
What is the difference between SRAM and DRAM?
SRAM is faster but more expensive. DRAM needs to be refreshed more often.
Match the item on the left with the definition on the right.
Hit
Item found in a specified level of hierarchy
Match the item on the left with the definition on the right.
Hit Time
Time required to access the desired item in a specified level of hierarchy (includes the time to determine if the access is a hit)
Match the item on the left with the definition on the right.
Miss
Item not found in a specified level of hierarchy
Match the item on the left with the definition on the right.
Miss Penalty
The additional time required to service the miss.
Match the item on the left with the definition on the right.
Hit Rate
Fraction of accesses that are in a specified level of hierarchy.
Match the item on the left with the definition on the right.
Miss Rate
Fraction of accesses that are not in a specified in a level of hierarchy.
Match the item on the left with the definition on the right.
Block
Unit of information that is checked to reside in a specified level of hierarchy and is retrieved from the next lower level on a
The index of the cache is to take the lower N bits of the physical address. What is usually the tag?
The upper remaining bits
Two's Complement
...
Other sets by this creator
CDA 3100 Test #2
124 terms
CDA 3100 Exam 1
37 terms
CIS 4360 Final
37 terms
ADV 4603
6 terms
Recommended textbook solutions
Fundamentals of Database Systems
7th Edition
Ramez Elmasri, Shamkant B. Navathe
687 solutions
Information Technology Project Management: Providing Measurable Organizational Value
5th Edition
Jack T. Marchewka
346 solutions
Information Technology Project Management: Providing Measurable Organizational Value
5th Edition
Jack T. Marchewka
346 solutions
Operating System Concepts
9th Edition
Abraham Silberschatz, Greg Gagne, Peter B. Galvin
489 solutions
Other Quizlet sets
MKT chap 15
40 terms
MIS Ch. 7
43 terms
LBOGU FINAL REVIEW
54 terms
PHYS 1404 Chapter 1
16 terms