Cars drive 60 km/h over a 1 km long bridge. A car thus requires 1 minute to cross the bridge. Cars stay separated by about 100 m, so 1 car enters and another exits the bridge every 6 seconds. What is the execution time?
1 Minute
Behind a car's simple items like steering wheel, gas pedal, and brake pedal are complex mechanical/computerized details. This is an example of what?
Abstraction
The hex number F represents what decimal number?
15
An integrated circuit is often referred to as what?
chip
101011101010101000 Is an example of what kind of language?
Machine Language
add $2, $4, $6 is an example of what kind of language?
Assembly Language
Kilobyte is how many bytes?
1000
Megabyte is how many bytes?
1,000,000
Gigabyte is how many bytes?
1,000,000,000
Terabyte is how many bytes?
1,000,000,000,000
temp = v[k]; is an example of what kind of language?
High level language
Which term refers to software that provides services that are commonly useful, including operating systems, compilers, loaders, and assemblers?
Systems software
A device through which the user gives information to the computer is called
Input device
A device through which the computer gives information to the user is called
Output device
The part of the computer that performs arithmetic operations and makes decisions is called
CPU
The part of the computer being used to store data being used by programs is called
Main Memory
The part of the computer used for long-term, non-volatile storage is called
Secondary Memory
What is the biggest change in microprocessing in the last 20 years?
Multi-processing
A computer designed for use by an individual, usually incorporating a graphics display, a keyboard, and a mouse, is called what?
PC
A computer inside another device running one or more predetermine application or software is called
Embedded Computer
A computer used to run large programs for multiple users on a network is called
Server
What was the firs general purpose, electronic computer?
ENIAC
Which term refers to a program that translates a program written in a high-level language language into a low-level language like assembly or machine language?
Compiler
Which term refers to a class of computers with the highest performance and cost? They are configured as servers and typically cost tens to hundreds of millions of dollars.
Supercomputer
A desktop computer is not a personal mobile device, true or false?
True
Which term, which is just one simple metric used in measuring performance, is the number of tasks completed per unit of time?
Throughput
Clock speeds have not increased in the last several years. Why?
Powerwall
Java is an example of which type of language?
High-Level Language
Cars drive 30 mph over a 1 mile long bridge. A car thus requires 2 minutes to cross the bridge. Cars stay separated by about one-tenth of a mile, so 1 car enters and another exits the bridge every 12 seconds. What is the execution time?
2 Minutes
"A sister and brother are hanging clothes to dry. They both hang clothes simultaneously to make the job go faster." is an example of what Great Idea of Computer Architecture?
Performance via Paralellism
A brother and sister are washing and drying dishes. The sister is drying each dish immediately after the brother washes it." is an example of what Great Idea of Computer Architecture?
Performance Via Pipelining
"A mom expects her son will be hungry after a long airplane flight, so she cooks dinner just in case." is an example of which Great Idea of Computer Architecture?
Performance Via Prediction
"A drummer's stick breaks, but he quickly grabs another one and continues playing the song." is an example of which Great Idea of Computer Architecture?
Dependability via Redundancy
Cars drive 30 mph over a 1 mile long bridge. A car thus requires 2 minutes to cross the bridge. Cars stay separated by about one-tenth of a mile, so 1 car enters and another exits the bridge every 12 seconds. What is the throughput?
5 Cars per Minute
"A customer talks to a phone agent. If there's a problem, he talks to the agent's supervisor" is an example of which Great Idea of Computer Architecture?
Hierarchy of Memories
"A house architect first designs a house with 5 rooms, then designs room details like closets, windows, and flooring." is an example of which Great Idea of Computer Architecture?
Abstraction to simplify design
"A College student rents a flat closer to campus than her weekend beach spot" is an example of which Great Idea of Computer Architecture?
Make the common case fast
Convert 21 to binary
10101
Convert 10111 to Decimal
23
Translate 101010 into decimal
42
The hex code 1F represents what decimal number?
31
What is the sum of the binary codes 1011 and 1101?
11000
In assembly language programming, which of the following is used to assign a name to a memory address?
Label
Which section of a MIPS assembly program contains the assembly program instructions?
.text
Which section of a MIPS assembly program contains program data?
.data
Is 'avoiding errors' a valid reason to choose assembly programming?
No
In assembly language programming, what starts with a dot and is used to give information to the assembler without being directly translated into machine language instructions?
Assembler Directives
What is a type of assembly language instruction that isn't actually recognized by the CPU hardware, but is instead translated by the assembler into one or more CPU instructions?
Pseudoinstruction
A short segment of MIPS/SPIM code is shown below that is supposed to print a string. Note that 4 is the SPIM system call code for printing a string.
li ____, 4 la $a0, str syscall
What should be used to fill in the blank to complete the segment of code?
$v0
A short segment of MIPS/SPIM code is shown below that is supposed to exit the program. Note that 10 is the SPIM system call code for exiting the program.
li ____, 10 syscall
What should be used to fill in the blank to complete the segment of code?
$v0
What is the difference between a flip-flop and a latch?
The flip-flop change on a clock edge, while a latch changes when input changes.
What type of device contains logic circuitry that can be configured programmatically to implement desired combinational and sequential logic?
FPGA
True or false: SRAM is faster than DRAM, but more expensive. ?
True
What type of device takes an n-bit binary input and has 2n outputs, such that each binary input corresponds to exactly one of the outputs?
Decoder
Give a Boolean algebra expression that represents the truth table below.
(~AB) + (A~B)
Consider an SR latch with outputs Q and ~Q.
Assume the output is currently Q=0 and ~Q=1.
What would happen if the input S is asserted?
Q and ~Q are toggled.
Consider an SR latch with outputs Q and ~Q.
Assume the output is currently Q=0 and ~Q=1.
What would happen if the input R is asserted?
Nothing changes.
What is the Boolean expression that corresponds to the output Y?
Y = (A Ā· B Ā· C) + (A Ā· ~B Ā· C)
Give a Boolean algebra expression that represents the truth table below.
C = ~A Ā· B
True or false: RISC processors have instructions that take many clock cycles to execute
False
Both instructions and data can be stored in memory and encoded as binary numbers. True or false?
True
Given b=2, c=5, d=1. What is the final value of a after the following instructions have executed?
add t, d, c add a, t, c
11
Given b=2, c=5, and d=1. What is the final value of b after the following statement has executed?
add b, c, d
6
Give a MIPS add instruction that would compute the following:
z = x + y
add z x y
Write a total of exactly 3 add and subtract instructions in MIPS assembly that would calculate the following:
a = b + c - d + e
add a b c sub a a d add a a e
Which term is used for the natural unit of a computer? It typically refers to the size of data that the architecture is designed to handle per instruction.
Word
True or false: $one is a valid MIPS register?
False
True or false, $zero is a valid MIPS register?
True
In the MIPS architecture, how many bits is each register?
32
Convert the following binary number into hexadecimal:
1001 1011 0001 0011
9B13
True or false: 'jump 2500' is a valid MIPS instruction?
False
In the MIPS architecture, how many bytes is each word?
4
Assume $s3=5000 and words addressed from 5000 to 5002 have the data shown:
5000: 99 5001: 77 5002: 323
What value will be put in $t0 by the following instruction?
lw $t0 1($s3)
77
Assume $s3=900, $t0=77, and memory locations 900, 904, and 908 have the values 10, 15, 20 respectively. What would those memory locations have after the following instruction executes?
sw $t0 4($s3)
10, 77, 20
Assume that an int takes up 4 bytes of memory on a computer architecture that has 4-byte words. Also, like MIPS, this architecture addresses each byte of memory.
Assume that we have an array of 5 int values:
int values[5];
If the values array has a base address of 2000, then what is the address of values[1]?
2004
Assume $s0=3. What value would be stored in $t2 after the following instruction has executed?
12
Assume $s0=10, $s1=50, and $s2=30. Given this code:
bne $s3, $s4, Else add $s0, $s1, $s2 j Exit
Else: sub $s0, $s1, $s2
Exit:
What value would be stored in $s0 after this code has executed?
20
Consider the following high-level loop:
int i=10; do { i+=5; } while(i<=50);
Write this in MIPS assembly code.
main: .text li $t0, 10 li $t1, 50
loop: add $t0 $t0 5 ble $t0 $t1 loop jr $ra
What is the name of the register that contains the address of the instruction currently being executed?
Program counter or PC
What is the common name for the area of memory where local variables and function parameters are stored?
Stack
What term is used for the segment of memory that contains a function's saved registers, local variables, and parameters?
Activation Record
What happens if memory is dynamically allocated on the heap and never deallocated?
Memory Leak
C++ programmers have to explicitly deallocate dynamic memory on the heap, while Java automatically deallocates memory on the heap through garbage collection. True or false?
True
Consider << to be a bitwise left shift operator. What is 13<<2?
Give your answer in decimal.
52
Consider >> to be a bitwise right shift operator. What is 13>>2?
Give your answer in decimal.
3
Consider the addition of two binary numbers: 1 + 1
Which of the following is a true statement about the result of the addition?
The result is 10, 1 is the carry and 0 is the sum
What situation occurs when the result of an operation contains more bits than can be represented by the architecture?
Overflow
Convert 0.5 to binary.
0.1
Convert 2.375 to binary.
10.011
Assume -1.5 is represented using the 32-bit IEEE 754 floating-point standard. What would the content of the 'Sign' field in the binary value? Your answer should consist of exactly 1 bit.
1
Assume -1.5 is represented using the 32-bit IEEE 754 floating-point standard. What would be the first 8 bits of the 'Mantissa' field be in the binary value? Your answer should consist of exactly 8 bits. If applicable, include leading zeroes in your answer. Also, be sure to drop the digit before the point.
1000 0000
Assume -1.5 is represented using the 32-bit IEEE 754 floating-point standard. What would the content of the 'Exponent' field in the binary value? Your answer should consist of exactly 8 bits. If applicable, include leading zeroes in your answer. Also, be sure to account for bias on the exponent.
0111 1111
Assume 10.375 is represented using the 32-bit IEEE 754 floating-point standard. What would the content of the 'Exponent' field in the binary value? Your answer should consist of exactly 8 bits. If applicable, include leading zeroes in your answer. Also, be sure to account for bias on the exponent.
1000 0010
Assume 10.375 is represented using the 32-bit IEEE 754 floating-point standard. What would be the first 8 bits of the 'Mantissa' field be in the binary value? Your answer should consist of exactly 8 bits. If applicable, include leading zeroes in your answer. Also, be sure to drop the digit before the point.
0100 1100
Which of the following best characterizes a rising clock edge?
Clock signal changing from 0 to 1
What term refers to the ALU, registers, buses that carry data between the ALU and registers, and simple components that are connected to the ALU?
Datapath
Assume we have the 4-bit binary value 1000. If the value is sign-extended to 8-bits, what is the result?
1111 1000
The outputs of what type of logic component are determined solely on its current inputs?
Combinational
Consider the MIPS register file. The register file always writes data to the register whose number is input to the "Write register' input. True or false?
False
Assume that the Program Counter contains the address 1000. Assuming no branch or jump instruction is executed, the Program Counter will be updated to what address next?
1004