Reminder Items Flashcards
What is a program?
A program is a set of instructions written in a programming language that performs a specific task when executed by a computer.
What is data?
Data refers to information processed or stored by a computer. It can be in various forms such as text, numbers, images, etc.
What does it mean to run the program?
Running a program means executing its code instructions one by one.
What computer component executes programs?
The CPU (Central Processing Unit) executes programs.
Where is the running program stored? What else (other than the program code) is stored there?
The running program is stored in RAM (Random Access Memory), along with data, variables, and the operating system.
What do we know about RAM memory?
RAM is random-access, relatively slow compared to the CPU, and volatile (loses data when power is off).
What is memory stall?
A memory stall occurs when the CPU waits for data to be fetched from memory, slowing down processing.
What long-term storage do we have?
Long-term storage includes hard drives, SSDs, and other non-volatile storage devices.
What is an executable file?
An executable file is a binary file that contains compiled code ready to be executed by the CPU.
How do the speeds of CPU, RAM, and hard disk compare?
CPU is the fastest, followed by RAM, and then the hard disk, which is the slowest.
What is a machine cycle?
A machine cycle is the basic operation cycle of a computer during which it fetches, decodes, and executes instructions.
What are the basic steps of the machine cycle?
The basic steps are: Fetch, Decode, Execute.
What does frequency measure? What is the measurement unit of frequency?
Frequency measures how often something occurs per second, measured in Hertz (Hz).
What is CPU clock? What is CPU frequency?
The CPU clock synchronizes operations within the CPU. CPU frequency is the speed at which the CPU operates, measured in Hertz.
What is CPU core? What does it mean “quad-core CPU,” “octa-core CPU”?
A CPU core is an individual processing unit within the CPU. A quad-core CPU has four cores, and an octa-core CPU has eight cores.
How does memory look like?
Memory looks like a linear array of bytes.
What is a byte? What is a bit? How many bits are in a byte?
A byte is 8 bits. A bit is the smallest unit of data, representing a 0 or 1.
What is a memory address?
A memory address is a unique identifier for a memory location.
What is the memory address of a larger chunk of memory?
It’s the address of the first byte of that memory chunk.
What is the length of a memory address? What does it mean “32-bit address”?
The length is the number of bits in the address. A 32-bit address can reference 2^32 memory locations.
How much memory can we address/use with the given length of a memory address?
With a 32-bit address, we can address up to 4 GB of memory.
How long should memory addresses be to address a given amount of memory?
The length should be log2(memory size in bytes)log2(memory size in bytes). For example, 64-bit addresses for up to 16 exabytes.
Can memory contain nothing at all?
No, memory always contains data, even if it’s just zeros or uninitialized data.
What is the relationship between a C++ variable, RAM, and a memory address?
A C++ variable is stored in RAM at a specific memory address.