Back to notes
What are stacks and queues, and how do they differ?
Press to flip
Stacks follow a Last In, First Out (LIFO) method, while queues follow a First In, First Out (FIFO) method. Both are specialized data structures used for different types of data management.
What is a byte and how many different combinations can it have?
A byte is a group of 8 bits, and it can have 256 different combinations.
What is the primary difference between high-level and low-level programming languages?
High-level programming languages abstract machine code to make programming easier (e.g., Python, C), while low-level languages are closer to machine code and provide more control over hardware.
Describe how transistors function in a CPU.
Transistors in a CPU can be either on or off, representing binary 1 or 0. They form the basis for logical operations and calculations.
What is Big O notation and why is it important in algorithm analysis?
Big O notation expresses the time and space complexity of an algorithm. It is important because it helps in analyzing and comparing the efficiency of algorithms.
Describe the main characteristics of a linked list.
A linked list consists of nodes that each contain data and a reference to the next node, allowing dynamic resizing compared to the fixed size of arrays.
What are logic gates and what do they represent?
Logic gates are built using transistors and they represent logical statements such as AND, OR, and NOT, which are the basis for Boolean algebra.
Explain what a pointer is in programming and one of its common uses.
A pointer is a variable that stores the memory address of another variable. Common uses include dynamic memory allocation and array manipulation.
Describe the four-step machine cycle in a CPU.
The four-step machine cycle includes Fetch (retrieve an instruction), Decode (translate the instruction), Execute (perform the operation), and Store (write the result to memory).
In the context of databases, what are primary keys and foreign keys?
Primary keys uniquely identify each record in a table, while foreign keys are used to link records between tables, enforcing referential integrity.
Explain how machine learning algorithms learn from data.
Machine learning algorithms learn by being trained on a dataset, which allows them to recognize patterns. They use this knowledge to make predictions or decisions based on new data.
What is the role of the operating system kernel in a computer?
The operating system kernel manages hardware and applications and uses device drivers to interact with the hardware. Examples include Windows, Linux, and Mac.
Define a hash map and its primary operation.
A hash map is a data structure that stores key-value pairs using a hash function to map keys to indices in an array, facilitating fast data retrieval.
Explain the difference between the binary and hexadecimal numbering systems.
The binary system is based on powers of 2 and uses only 0 and 1, while the hexadecimal system is more readable, using digits 0-9 and letters a-f, and it is based on powers of 16.
What are some common protocols used in computer networks, and what are their purposes?
Common protocols include TCP/IP (manages data transmission over the internet), HTTP (facilitates transfer of web pages), and DNS (translates domain names to IP addresses).
Previous
Next