Questions and answers verified to pass
Data and instructions - correct answer ✔In the Von-Neumann model, what 2
things can we store in memory?
1. Control unit (instruction register and program counter)
2. Processing unit (arithmetic logic unit and processor registers) - correct
answer ✔Name 2 components inside the cpu:
A bus is a communication system that transfers data between components
inside a computer - correct answer ✔What is a bus?
The stack grows down from high memory and the heap grows up from low
memory, so they will never bump into each other - correct answer ✔What
direction does the stack grow?
The stack is a last in first out data structure, it is managed closely by the cpu,
every time a function declares a variable it is pushed to the top of the stack,
when the program ends everything in the stack is freed - correct answer
✔What is the stack used for?
The heap is a region of memory that is not automatically managed for you:
This means that to allocate mem you must use malloc() and calloc() and once
you do it is your responsibility to use free() to de-allocate the mem when you
are done - correct answer ✔What is the heap used for?
, An activation record is another name for a stack frame, it's the data structure
that composes a call stack - correct answer ✔What is an activation record?
1. A control link
2. An access link - correct answer ✔Name 2 things in an activation record:
Representing negative numbers in computers - correct answer ✔What are
signed magnitude, one's compliment, and two's complement used to
represent?
Two's complement - correct answer ✔Which representation do modern
systems use?
Even though you still have two zeros (000 and 111), arithmetic computation
becomes easier - correct answer ✔What is one advantage of one's
compliment over signed magnitude?
It still uses two zeros - correct answer ✔What is a disadvantage of one's
complement?
1. Sign: 1st bit determines positive/negative
2. Exponent: Next 8 bits indicate the exponent of the number
3. Mantisa: Last 23 bits used for the fraction - correct answer ✔What are the
3 parts of a floating point number in IEEE 754 notation?
Flip - correct answer ✔One's compliment
Flip + 1 - correct answer ✔Two's compliment