Introduction to Computers and Programming Flashcards
What is a program?
A set of instructions a computer follows to perform a task.
What is the role of a programmer or software developer?
A person who designs, creates, and tests computer programs.
What are the five major hardware components of a computer system?
CPU, main memory, secondary storage, input devices, output devices.
Why is the CPU considered the most important component of a computer?
It executes programs, and the computer cannot run software without it.
What is the difference between RAM and secondary storage?
RAM is volatile and used for active programs; secondary storage is non-volatile and holds data long-term.
What are the advantages of solid-state drives (SSDs) over disk drives?
SSDs have no moving parts and are faster than disk drives.
What is the function of input and output devices?
Input devices send data to the computer; output devices present processed data.
How is data stored in a computer?
As sequences of 0s and 1s (binary).
What is the smallest unit of data in a computer?
A bit (binary digit), which can be 0 or 1.
How many values can be stored in 8 bits (1 byte)?
256 values (0 to 255).
What is ASCII and Unicode used for?
Encoding characters as numeric codes in binary form.
What is the purpose of the fetch-decode-execute cycle?
It describes how the CPU processes instructions in three steps: fetching, decoding, and executing.
What is assembly language, and how does it differ from machine language?
Assembly language uses mnemonics instead of binary; it is still low-level and requires an assembler to convert it to machine code.
What are the main advantages of high-level programming languages?
They are easier to read, write, and understand than low-level languages.
What is the difference between a compiler and an interpreter?
A compiler translates an entire program before execution, while an interpreter translates and executes each instruction immediately.