CSCI 463 Computer Architecture Final

Ace your homework & exams now with Quizwiz!

Which of the following shows counting, in order, in binary, from zero to seven?

000 001 010 011 100 101 110 111

How many bits make up a byte?

4 bits = 1 byte Note that 4 bits also equals one hexadecimal number. So one hex also equals 1 byte

What is a ascending stack?

A stack that can be said to grow downwards (counterintuitively). A stack where the top of the stack (ie. the spot you are gonna push to) is at the highest address.

What does an ALU diagram look like (flip to see)

An ALU:

What happens in a system using preemptive multithreading when a process never yields?

It will run until a timer starts a different process.

What is 'The Instruction Cycle' ?

The fetch-decode-execute instruction loop that a CPU performs

When data is transferred between a CPU cache and the main system memory, it is done in blocks of data on the order of 64-128 bytes at-a-time. True/False

True Note that this transfer can be done with anything from 16-128 bytes typically

What does temporal locality refer to?

When the same data from memory is being used over and over again in the near future.

Which two's complement binary number represents the decimal value 12?

01100 Note that the bit all the way to the right (LSB) starts at power of 2^0 = 1 . Therefore this bit will only be on when the number is odd. The powers of the rest of the bits (followed ascending from there) must add up to the decimal value. Here -> 2^3 + 2^2 = 12

Given an N-way set associative cache with a 20-bit tag, an 8-bit index and a 4-bit offset then how large is the set size if the cache has a total of 4096 lines?

16

What is a Bus?

A collection of related signals

What is the difference between a Gated RS Latch and a D latch?

The D latch is a Gated RS latch with a NOT gate added to it.

The RV32I ABI allows leaf functions to be created that never need to use the stack: true or false

True

What does the the truth table for a half adder look like?

Truth table for a half adder:

Does a free-standing application set up its own address space?

Yes, it must, no one else will do it for it.

What is the decimal value of the following two's complement binary value : 1001

-7 Note that two's complement is gotten by first having the number in binary, then flipping all the bits, and finally adding 1 to the result. To undo this. we do this in reverse. So here: 1001 - 1 = 1000 Reverse bits -> 0111 And 2^2 + 2^1 + 2^0 = 7 Since the two's complement MSB was 1, then -7.

What is the least significant bit of the binary number whose value, in decimal, is 12342354356456337989079806876542363467345342

0 Note that we are talking least significant bit, not number. The last number in this digit is 2, which is even and therefore will have the binary bits 0010 . If it were odd (say 3) the least significant bit would be 1 . ie there are only two options for this question. 0 or 1 based on even or odd digit at the end.

What value represents the result of sign-extending the following binary number to 8-bits? 0111

0000 0111 Note that sign extending means the MSB is determining the sign. Here the 0 is the MSB so to fill up all eight bits, 4 zeros are added at the right.

What value represents the result of zero-extending the following binary number to 8-bits? 1000

0000 1000 Note that zero extending doesn't care about signs and it does what it says it does. It simply adds zeros to the spaces needed regardless of what the MSB is.

What is the result of a logical shift right by 2 bits of the following binary number: 11001001

0011 0010 Note that logical right shifting means any added bits on the left most side are added as zeros. All of the dropped bits are forgotten.

If page size=4k, then how many pages are in a system with a 32-bit virtual address?

0x100000 Note that this answer is in hex. So 32^pagesize = # number of pages (in this case 1048576 in hex)

What is least significant bit of the binary number whose value, in decimal, is 1234232452345645678678978978765435333 ?

1 Note that we are talking least significant bit, not number. The last number in this digit is 3, so the least significant bit would be 1 since 3 in binary is 011 ie there are only two options for this question. 0 or 1 based on even or odd digit at the end.

Which two's complement binary number represents the decimal value -12?

10100 Note that two's complement is gotten by first having the number in binary, then flipping all the bits, and finally adding 1 to the result. So here: 12 -> 1100 sign extended for negativity, is 12 -> 0000 1100 flipped (aka 1's complement) -> 1111 0011 + 1 -> 1111 0100 cutting off the extra sign extension (to choose from choices) -> 10100

What value represents the result of sign-extending the following binary number to 8-bits? 1000

1111 1000 Note that sign extending means the MSB is determining the sign. Here the 1 is the MSB so to fill up all eight bits, 4 ones are added at the right.

What is the result of an arithmetic shift right by 2 bits of the following binary number: 11001001

11110010 Note Do not be fooled. This is not the same question. Arithmetic shift mean that any numbers added on the left will be added as sign extended. That means whatever the left most (MSB) bit is. Here it is a 1 so the number added to the left when shifting are added as 1's. However, if it were a zero, arithmetic shifting would look the same as logical shifting since the entering numbers would be zeros.

What is the largest value that can be added to rs1 in the addi instruction?

2047 Note that this is since this is the max size of of the immediate value area

If a D latch propagation delay = 2nsec & we build an asynchronous counter, how long will it take for all of the output bits of a 10 bit counter to stabilize (reach a quiescent state) after an edge of the clock causes it to increment?

20nsec Note that propagation delay is delay * inputs

Which of the following values represents the IEEE-754 floating point value of the decimal number: 0.25?

3e800000 Note that this value is in hexadecimal representation, not decimal.

How many bytes of memory are needed to hold the page table for a system that uses one single-level page table in a system with 32-bit virtual addresses, a 4K page size, and each PTE is 4-bytes?

4 megabytes

What is the decimal value of the following unsigned binary value : 1001

9 Note that the bit all the way to the right (LSB) starts at power of 2^0 = 1 . Therefore this bit will only be on when the number is odd. The powers of the rest of the bits (followed ascending from there) must add up to the decimal value. Here -> 2^3 + 2^1 = 9

What does a Mealy state machine look like? (flip to see)

A Mealy state machine example:

What does a Moore state machine look like? (flip to see)

A Moore state machine example:

What does a decoder diagram look like (flip to see)

A decoder:

What is an Edge Sensitive RS latch also commonly called as?

A flip-flop

What does a half- adder diagram look like (flip to see)

A half adder:

What is an example of secondary memory?

A magnetic disk Note that this includes where memory not in the CPU registers get stored.

What sort of SISD program operation is likely to run faster?

A program that processes data elements from an array in order from element 0 to N in ascending order.

What is a descending stack?

A stack that can be said to grow upwards (counterintuitively). A stack where the top of the stack (ie. the spot you are gonna push to) is at the lowest address. Note that this is the most commonly used type of stack

What is an empty stack?

A stack where the stack pointer (ie. the slot you are going to push to next is resting at the address after the last thing you pushed in. Note that whether this next address is lower or higher then the previous depends on whether the stack is ascending/descending

What is a full stack?

A stack where the stack pointer (ie. the slot you are going to push to next is resting at the address of the last thing you pushed in.

What is two's complement?

An advanced number storage encoding scheme used for negative numbers gotten by first getting the binary representation, flipping all the bits to the opposite, and adding a one to the result. If the number you are representing was a negative, you also add a 1 as the MSB (that means besides what you already have) to your final result.

What is a hosted application?

An application that makes use of other software (such as an operating system) in order to function and does need to directly manage the hardware.

What do all sequential circuits have in common?

At least one signal loops from an output back to an input either directly or indirectly.

Why do we have to turn off relaxation when initializing the GP register?

Because the linker will otherwise optimize the operation is a way that will leave the value in the GP register unchanged.

What does Most Significant Bit (MSB) mean?

Binary bit all the way to the left (aka. the first bit) Note that this means bit. A digit (ie regular numbers) is NOT a bit, but it can be written as a set of 4 bits.

What does Least Significant Bit (LSB) mean?

Binary bit all the way to the right (aka. the last bit) Note that this means bit. A digit (ie regular numbers) is NOT a bit, but it can be written as a set of 4 bits.

What is the relationship between a core and a hyperthread?

Cores can have multiple hyperthreads that share some resources.

What is sign extending?

Extending when the MSB is determining the sign, so the bit all the way to the right is what determines what you fill your empty spaces with.

What is Zero Extending?

Extension that doesn't care about signs and it does what it says it does. It simply adds zeros to the spaces needed regardless of what the MSB is.

The main system memory in a typical laptop computer is ROM. True/False?

False Note that ROM is embedded and cannot be written to (ie. it is read only). Having this as main memory would be useless.

Subtracting the following binary numbers will result in an unsigned overflow: 1000 -0001 -----

False Note that unsigned subtract overflow only occurs when using the two's complement method and there is not a carry out of the MSB.

What is the difference between the Harvard and a Von Neumann Architectures?

Harvard has two memory busses and the Von Neumann has one

When subtracting binary numbers, how is a signed overflow condition determined?

If the carry into the MSB is different than the carry out of the MSB.

Where is the operand value located when a 68K CPU instruction uses the Immediate Addressing Mode?

In the instruction's immediate value

If a fully associative cache has a 28-bit tag, a line size of 16-bytes, and a 32-bit address then in which cache line would a byte from memory address 0x12345678 be placed?

It can be placed on any line with the tag set to 0x1234567

What is accomplished by declaring a variable as volatile?

It forces the compiler to fetch & store the value of the variable every time it uses it

What does the RISC-V amoswap instruction do?

It performs both a read and write operation on the same memory location and it prevents any other processing elements to access that memory location between the read and the write.

What does it mean when an input signal is low?

Its output is 0

What does it mean when an input signal is high?

Its output is 1

What part of the a processor does dynamic address translation?

MMU

What type of machine has outputs that are driven from a combination of the latch signals and the input signals?

Moore machines

Does a hosted application need to provide its own sbrk() implementation?

No Note that this question asks about a hosted application, not a free-standing one. Therefore a hosted application can make use of the features of the host rather than having to make its own. sbrk deals with memory breaks, which a hosted app does not have to worry about.

Are web-based applications are free-standing applications?

No Note that web-base applications use other software (aka. hosts) in order to operate.

What do all combinational circuits have in common?

No signal may loop from an output back to an input either directly or indirectly.

What sort of memory is in an SD card like you'd use in a digital camera, volatile or non-volatile?

Non-Volatile Note that this is because it does not require power to retain the bits being stored.

Is ROM memory volatile or non-volatile?

Non-volatile

What is the disadvantage of Mealy machines over Moore machines?

Not all Moore machines can be represented as Mealy, while all Mealy and finite state machines can be represented as Moore.

How can an O/S share pages between two different virtual address spaces?

Put the same physical page address in each of the process's page tables.

What is the relationship between the number of address lines ( A ) on a decoder and its number of output lines ( Q )?

Q = 2^A

A gated RS latch is sequential circuit or combinational circuit?

Sequential circuit

Subtracting the following binary numbers will result in a what kind (signed/unsigned) of overflow: 1000 -0001 -----

Signed overflow because the numbers will not overflow if being subtracted in unsigned.

What is the advantage of a Mealy State Machine over a Moore state machine?

Sometimes a Mealy state machine can accomplish the same thing with fewer states as a Moore state machine can.

Which sequential circuits have the clock inputs to all latches connected to the same source-signal, synchronous or asynchronous?

Synchronous Note that asynchronous circuits each have their own clock signal.

What commonly is required to start a program running that calls a C function compiled with gcc?

The BSS region has to be zeroed out The stack pointer has to be set (among other things)

What is a rising edge in a waveform diagram?

The change of an input's output from 0 to 1

What is a falling edge in a waveform diagram?

The change of an input's output from 1 to 0

Subtracting the following binary numbers will result in a signed overflow: 1000 -0001 -----

True Note that signed overflow for subtraction occurs when subtracting signed numbers happens when the top number is positive, but the bottom is, and the result should be negative (same as adding more than can fit), or when the top is negative and the bottom is not and the result should be positive (which is the case here with a result of 0111 )

When/why would one prefer to use the SOP form (as opposed to the POS form) of expressing a boolean function?

Use SOP when there are more cases when the output is false than true.

What does spatial locality refer to?

When different data that is nearby a recently used data item is used in the near future.

What is the dirty bit used for in a cache?

When set, it indicates that the data in a cache-line has been modified by the CPU and must be written back into the memory.

What is the valid bit used for in a cache?

When true, it indicates that the data in a cache-line is NOT garbage.

Should a multi-threaded application (optimally) hold any locks for short as possible and do most work without holding a lock at all?

Yes

Is an operating system is an example of a free-standing application?

Yes Note that a freestanding application is built from scratch (ie. not dependent on other software to execute) and needs to decide how to address, execute, and make use of the computer hardware on its own. It must also set up its own address space.

Is static RAM normally used for the register memory inside a CPU core?

Yes Note that static memory remains even after the machine operating it is shut off.

Does Dynamic memory (DRAM) require a periodic refresh cycle in order to retain the bit values it has stored?

Yes Note that this is because it is built from tiny batteries and is dynamic memory.

Is an RS latch w/Enable is the same thing as a Gated RS Latch?

Yes.

It is possible that a machine with 1GB of physical/real memory to run a process with a virtual address space that is 4GB in size?

Yes. Note that a machine can fake having more memory than it actually does because not all memory is used at the same time. So it "saves" its spot to come back to later when it needs to.

Can the nm command can be used to list the symbols in an ELF file?

Yes. Note that an ELF file stands for Executable and Linkable Format and defines the structure for binaries, libraries, and core files. This formal specification allows the operating system to interpret the machine instructions correctly. Meanwhile the linux nm command displays information about symbols in the specified file, which can be an object file, an executable file, or an object-file library. Therefore it can be run (and is useful) in an ELF file.

What byte does a little-endian machine store first?

The least significant byte (ie. the rightmost)

Which bit changes after the least significant bit in a ripple counter?

The most significant bit (right most)

What bit does a big-endian machine store first?

The most significant byte (ie. the leftmost)

A waveform diagram is used to indicate:

The timing changes between a series of input and output signals. They show where signals go and what the output does over the course of time with each input/output having its own wave to indicate its state at that time.

What is the purpose of crt0.S?

To initialize the address space and any libraries used by an application program.

Faster memories tends to cost more than slower memory technology. True/False?

True

For a given price, larger memory circuits tend to be slower than smaller ones. True/False

True

What inputs can a Mealy state machine show in its waveform diagram?

state, clk, D, Q

In what order are the regions of the address space of a running C program arranged?

text, data, bss, heap, stack

According to the RISC-V ABI calling convention, what values go into what registers in order to call a function such as: void f(int x, int y)

x1 = return address x10 = x x11 = y Note that (see picture)

On a RISC-V CPU, which register is used for the stack pointer register?

x2


Related study sets

Fundamentals Exam 1 Practice Questions

View Set

art appreciation chapters 15,16,17

View Set

PEDS- Chapter 5- "the point review"

View Set

Chapter 5: Viral Structure and Multiplication

View Set