Podcast
Questions and Answers
What does computer architecture primarily refer to?
What does computer architecture primarily refer to?
- The physical construction of computers only
- The design of a computer system, including components and their organization (correct)
- Networking protocols
- Software development methodologies
What unit is a CPU's speed typically measured in?
What unit is a CPU's speed typically measured in?
- Revolutions per minute (RPM)
- Gigahertz (GHz) (correct)
- Megabytes (MB)
- Pixels
What is the main function of the ALU?
What is the main function of the ALU?
- To store data
- To display images on the screen
- To perform arithmetic and logical operations (correct)
- To control the operations of the computer
What is the role of the control unit in a CPU?
What is the role of the control unit in a CPU?
Which of these is an example of an input device?
Which of these is an example of an input device?
Which of the following is an example of an output device?
Which of the following is an example of an output device?
What type of memory is RAM?
What type of memory is RAM?
Which type of memory is non-volatile?
Which type of memory is non-volatile?
What does the term 'bit' stand for?
What does the term 'bit' stand for?
What is a byte?
What is a byte?
What is the purpose of adapter cards?
What is the purpose of adapter cards?
What is the primary function of a video card?
What is the primary function of a video card?
What type of port is commonly used for connecting to networks?
What type of port is commonly used for connecting to networks?
Why is the von Neumann architecture important?
Why is the von Neumann architecture important?
What is the role of registers in a CPU?
What is the role of registers in a CPU?
What is an algorithm?
What is an algorithm?
What is pseudocode?
What is pseudocode?
What is the purpose of a searching algorithm?
What is the purpose of a searching algorithm?
What is a linear search?
What is a linear search?
What does a sorting algorithm do?
What does a sorting algorithm do?
What is the name of the sorting algorithm, where successive elements are compared and swapped?
What is the name of the sorting algorithm, where successive elements are compared and swapped?
What two values does binary representation use?
What two values does binary representation use?
How many bits are in a byte?
How many bits are in a byte?
Which logic gate produces a true output only when all inputs are true?
Which logic gate produces a true output only when all inputs are true?
What does a NOT gate do?
What does a NOT gate do?
What is the output of an OR gate when both inputs are false?
What is the output of an OR gate when both inputs are false?
What output does a NAND gate produce if both inputs are high?
What output does a NAND gate produce if both inputs are high?
What is the output of an XOR gate when the inputs are different?
What is the output of an XOR gate when the inputs are different?
What is a transistor?
What is a transistor?
Which of the following data types stores whole numbers?
Which of the following data types stores whole numbers?
What is a 'string' in the context of data types?
What is a 'string' in the context of data types?
What base is the decimal number system?
What base is the decimal number system?
Which number system uses base 2?
Which number system uses base 2?
What is ASCII used for?
What is ASCII used for?
What is a file extension?
What is a file extension?
Which is an example of a plain text file type?
Which is an example of a plain text file type?
What is the purpose of file type markers?
What is the purpose of file type markers?
What is the primary goal of file compression?
What is the primary goal of file compression?
What does lossless compression mean?
What does lossless compression mean?
Which type of file compression reduces file size by removing data?
Which type of file compression reduces file size by removing data?
What is the role of the program counter within the control unit?
What is the role of the program counter within the control unit?
According to the von Neumann architecture, where are both data and instructions stored?
According to the von Neumann architecture, where are both data and instructions stored?
What is the primary function of the motherboard?
What is the primary function of the motherboard?
Which of the following is a characteristic of RAM?
Which of the following is a characteristic of RAM?
What is the purpose of a port on a computer?
What is the purpose of a port on a computer?
Identify the gate and match A, B, and Y in brackets to check.
Identify the gate and match A, B, and Y in brackets to check.
The truth table for system of four NAND gates as shown in figure is
The truth table for system of four NAND gates as shown in figure is
To get an output 1 from the circuit shown in the figure, the input must be
To get an output 1 from the circuit shown in the figure, the input must be
The truth table given in table represents:
The truth table given in table represents:
To get an output of 1 from the circuit shown in figure the input must be:
To get an output of 1 from the circuit shown in figure the input must be:
Which logic gate creates this truth table?
Which logic gate creates this truth table?
Which logic gate creates this truth table?
Which logic gate creates this truth table?
Which logic gate creates this truth table?
Which logic gate creates this truth table?
Which logic gate has the following notation:
$\overline{A + B}$
Which logic gate has the following notation:
$\overline{A + B}$
Which logic gate has the following notation:
$\overline{A . B}$
Which logic gate has the following notation:
$\overline{A . B}$
Symbol C represents Logic Gate:
Symbol C represents Logic Gate:
Flashcards
Computer architecture
Computer architecture
The design of a computer system, including components and their organization. Encompasses hardware and software aspects.
Von Neumann architecture
Von Neumann architecture
Proposed by John von Neumann, it's a design architecture for an electronic digital computer with subdivisions of a processing unit.
Central Processing Unit (CPU)
Central Processing Unit (CPU)
Most of the decision-making, arithmetic, and data manipulation occurs here, performing billions of instructions per second.
Control unit
Control unit
Signup and view all the flashcards
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
Signup and view all the flashcards
Registers
Registers
Signup and view all the flashcards
Machine cycle
Machine cycle
Signup and view all the flashcards
Memory addresses
Memory addresses
Signup and view all the flashcards
Logical Addresses
Logical Addresses
Signup and view all the flashcards
Physical Address
Physical Address
Signup and view all the flashcards
Adapter card
Adapter card
Signup and view all the flashcards
Video Card
Video Card
Signup and view all the flashcards
Sound Card
Sound Card
Signup and view all the flashcards
Port
Port
Signup and view all the flashcards
Monitor or Screen
Monitor or Screen
Signup and view all the flashcards
Mouse
Mouse
Signup and view all the flashcards
Keyboard
Keyboard
Signup and view all the flashcards
Algorithm
Algorithm
Signup and view all the flashcards
Pseudocode
Pseudocode
Signup and view all the flashcards
Linear search
Linear search
Signup and view all the flashcards
Sorting algorithm
Sorting algorithm
Signup and view all the flashcards
Bubble sort
Bubble sort
Signup and view all the flashcards
Data representation
Data representation
Signup and view all the flashcards
Bit
Bit
Signup and view all the flashcards
Byte
Byte
Signup and view all the flashcards
Logic gates
Logic gates
Signup and view all the flashcards
AND gate
AND gate
Signup and view all the flashcards
NOT gate
NOT gate
Signup and view all the flashcards
OR gate
OR gate
Signup and view all the flashcards
NAND gate
NAND gate
Signup and view all the flashcards
XOR gate
XOR gate
Signup and view all the flashcards
Truth table
Truth table
Signup and view all the flashcards
Adder
Adder
Signup and view all the flashcards
Half adder
Half adder
Signup and view all the flashcards
Full adder
Full adder
Signup and view all the flashcards
Integers (int)
Integers (int)
Signup and view all the flashcards
Character (char)
Character (char)
Signup and view all the flashcards
Floating-point number (float)
Floating-point number (float)
Signup and view all the flashcards
String
String
Signup and view all the flashcards
ASCII
ASCII
Signup and view all the flashcards
Unicode
Unicode
Signup and view all the flashcards
File extension
File extension
Signup and view all the flashcards
File type markers
File type markers
Signup and view all the flashcards
File compression
File compression
Signup and view all the flashcards
Lossless compression
Lossless compression
Signup and view all the flashcards
Lossy compression
Lossy compression
Signup and view all the flashcards
Study Notes
- Computer architecture includes the design of a computer system, its components, and their organization, covering both hardware and software.
- Computer architecture influences computing systems' capabilities and limitations, affecting execution speed and application effectiveness.
History of Computing
- Information technology (IT) involves using computers to store, retrieve, transmit, and manipulate data or information.
- A computer is an electronic device controlled by instructions in its memory, accepting data (input), processing it, producing information (output), and storing it for future use.
Computer Hardware vs. Software
- Computer hardware includes electronic devices, input/output, memory/storage, and networking/communication devices.
- Computer software includes system software, operating systems, device drivers, and application software.
Von Neumann Architecture
- The von Neumann architecture, proposed in 1945, is the template for modern computers.
- The architecture includes a processing unit (ALU and registers), a control unit, memory for data and instructions, external mass storage, and input/output mechanisms.
Computer Hardware Components
Motherboard
- A motherboard is a computer's primary printed circuit board (PCB) that connects hardware components like the CPU, memory, and storage devices.
- It provides electrical connections and pathways for data transfer between components and includes interfaces for external connections.
Central Processing Unit (CPU)
- A central processing unit (CPU) performs decision-making, arithmetic, and data manipulation by executing billions of instructions per second.
- The CPU's operation is controlled by a program listing what to do.
- CPU speed is measured in gigahertz (GHz), indicating clock frequency or rate.
- A processor has three main components: a control unit, an arithmetic logic unit (ALU), and registers.
- The control unit directs operations, the ALU performs calculations, and registers provide temporary storage.
- A machine cycle has four basic steps: fetching data and instructions, decoding instructions and sending them to the ALU, performing calculations in the ALU, and storing results.
Memory
- Memory encompasses various types of storage for temporarily or permanently holding data and instructions for processing.
- Key types include RAM, ROM, cache memory, HDDs, and SSDs.
- Memory impacts system performance and multitasking.
- Memory can be either volatile, needing power to retain memory, such as RAM, or non-volatile, holding contents without power, such as ROM and flash memory.
- RAM is fast, non-persistent and is used for processing, whereas ROM is persistent and is used to start up the computer.
- Static RAM (SRAM) is expensive with low power, and Dynamic RAM (DRAM) is cheaper with higher power.
- Flash memory acts like both RAM and ROM, allowing information writing and retaining data when powered off.
Memory Addresses
- Memory addresses are numerical identifiers that specify locations within the computer's memory.
- Each byte of memory has a unique address, allowing the CPU to access and manipulate stored data efficiently.
Logical Addresses
- Logical addresses are generated by the CPU during program execution and serve as references to access physical memory.
- Logical addresses are virtual and mapped to physical addresses using a memory management unit and a page table.
Physical Addresses
- Physical addresses represent the physical location of data in memory accessible by the CPU through logical addresses.
- The term physical address space refers to all physical addresses corresponding to logical addresses.
Peripherals
Internal Adaptation
- Internal adaptation involves using adapter cards and ports to connect and interact with different components and peripherals.
- Adapter cards extend functionality beyond built-in capabilities, while ports facilitate connections to external devices.
Adapter Cards
- An adapter card is an internal expansion card that enables communication with peripherals, such as video and sound cards.
- A video card generates output images for a display device and a sound card provides input and output of audio signals.
Ports
- A port is a physical or virtual interface enabling communication with external peripherals or networks through specific connections, protocols, and data transfer rates.
Speed Comparisons
- CPU registers have a latency of 1–3 nanoseconds and a capacity of less than 1 KB.
- CPU caches have a latency of 2–12 nanoseconds and a capacity of 1–8 MB.
- Main memory (RAM) has a latency of 10–60 nanoseconds and a capacity of 1 GB to 128 GB.
- SSD using PCIe has a latency of ~25,000 nanoseconds and a capacity of 64 GB to 2 TB.
- SSD using SATA has a latency of ~50,000 nanoseconds and a capacity of 64 GB to 2 TB.
- Hard drive using SATA has a latency of ~1,000,000 to 10,000,000 nanoseconds and a capacity of 128 GB to 10 TB.
External Peripherals
- External peripherals enhance functionality include input devices, output devices, storage devices, and networking devices.
- Common examples of external peripherals are monitors, mice, and keyboards.
Topic 2: Computer Algorithms
- Computer algorithms process input data through mathematical operations or logical operations, accessing memory, controlling hardware, and producing output results.
- An algorithm is a finite set of precise instructions for performing a computation or solving a problem.
- A program is a type of algorithm, but not all algorithms are programs.
- Algorithms typically have input, output, definiteness, correctness, finiteness, effectiveness, and generality.
- Pseudocode is a high-level, informal programming language used to express algorithms clearly without specific syntax constraints.
Searching Algorithms
- A searching algorithm finds a specific item within a data collection, and examples include linear search, binary search, hashing, DFS, BFS, and interpolation search.
Linear Search
- A linear search algorithm checks each element sequentially until it finds the target value.
- If target value matches an element in the collection, its index (or position) is returned.
Sorting Algorithms
- A sorting algorithm arranges elements in a specific order within a list or array.
Bubble Sort
- Bubble sort algorithm takes successive elements and 'bubbles' them up the list.
- It is among the simplest sorting algorithms.
Topic 3: Binary Representation
- Data representation on computers involves encoding, storing, and manipulating information.
- Binary representation uses bits (0 and 1) grouped into bytes (8 bits).
- Computers use binary, decimal, octal, and hexadecimal systems for numbers.
- Character encoding schemes like ASCII and Unicode map characters to numeric codes.
- Computers handle non-textual data such as images, audio, and video using formats like JPEG or MP3.
- Data structures like arrays and linked lists organize data in memory.
Logic Gates
- Logic gates are fundamental components of digital circuits that perform basic logical operations on binary inputs to produce binary outputs.
- Types of logic gates include AND, OR, NOT, NAND, NOR, and XOR gates.
- Complex logical functions can be implemented by connecting logic gates.
Transistors
- Transistors are semiconductor devices that control current flow based on applied voltage, arranged to create basic operations in logic gates.
- PMOS transistors switch on with low voltage, and NMOS transistors switch on with high voltage.
Truth Tables
- A truth table is a tabular representation showing the outputs of a logical expression or a combination of inputs.
- Truth tables define the behavior of logic gates, expressions, and Boolean functions, providing clarity and systematic analysis.
Logic Gates
AND Gate
- An AND gate produces a true output (1) only when all inputs are true.
NOT Gate
- A NOT gate inverts the input signal; a logic high (1) becomes a logic low (0), and vice versa.
OR Gate
- An OR gate produces a true output (1) when at least one input is true; otherwise, the output is false (0).
NAND Gates
- NAND gate outputs a low voltage (0) if — and only if — both inputs are high voltage (1).
XOR Gate
- An XOR gate produces a true output (1) if the number of true inputs is odd - the output is true (1) if the inputs are different (one true, one false).
Adders
- An adder is a digital circuit used to perform addition of binary numbers.
Half Adder
- A half adder adds two single binary digits, producing a sum bit and a carry bit.
Full Adder
- A full adder adds three binary digits, producing a sum bit and a carry bit.
Representing Data
Data Types
- Common data types include integers (int), characters (char), strings, floating-point numbers (float), and double-precision floating-point numbers (double).
Number Representation
- Computers use the binary system (base 2) to represent data with 0s and 1s.
- The hexadecimal number system (base 16) simplifies binary representation.
Text Representation
- Text is represented in binary using standards like ASCII and Unicode.
- ASCII uses 1 byte per character, while Unicode uses UTF-16 (2 bytes) or UTF-8 (variable bytes).
Image Representation
- Images are displayed using pixels with three colors: red, green, and blue (sub-pixels).
- Typically, 3 bytes per pixel are assigned, written in hex.
Topic 4: Data Storage
- Data is stored in various file types, each identified by a file extension.
- File type markers (magic numbers) are sequences of bytes at the beginning of a file that uniquely identify its format.
- File compression reduces file size using algorithms and techniques.
File Compression
- Lossless compression compresses files into smaller sizes without data loss, allowing them to be decompressed back to the original.
- Lossy compression removes data in a way that cannot be reversed, such as in JPEG images and MP3 audio.
- File compressibility depends on the algorithm, data patterns, and whether the file is already compressed.
Topic 1: Databases
- A database is a structured data collection allowing access, retrieval, modification, and usage.
- A database management system (DBMS) is software for creating and managing databases, acting as an interface between users and the database.
- DBMS functionalities: data storage, transaction support, recovery, authorization, remote access, and constraint enforcement.
- Main database types: relational (RDB), object-oriented (OODB), network, and non-relational (NoSQL).
Relational Databases
- Relational databases organize data into tables with rows and columns, allowing efficient querying and manipulation using SQL.
Entity–Relationship Diagrams (ERDs)
- An entity-relationship diagram (ERD) models the problem with symbols visualizing entities and their interrelationships.
- Entities are drawn as rectangles, relations as diamonds, and attributes as ovals.
- Relations can be one-to-many (1:M), many-to-many, or one-to-one.
- It's useful to add a quantity attribute in the relationship between order and product; to reduce redundancies.
Adding Attributes
- Attributes are information about the entity, drawn as ovals.
- Unique attributes become primary keys, which are unique data identifiers.
- Surrogate key is a number used as a primary key.
Adding Attributes to Relationships
- Determine the attributes by asking what information you need about the customer, order, product, and brand.
Topic 2: Convert an ERD to Tables
- Convert the ERD to tables to create the database.
- Entities become tables with their attributes as columns.
Foreign Keys
- A foreign key is an attribute in a database table that links to another table, representing a relationship between them through shared data
- One-to-many relations have a foreign key in the "many" entity, referencing the primary key of the "one" entity.
- Many-to-many relations require a junction table with primary keys of both related tables, acting as both foreign and primary keys.
- Primary key with multiple columns is called a composite primary key.
- One-to-one relations are possible and can be used for access control (confidential data) and table inheritance.
Topic 3: Create Tables Using SQL
- Use Structured Query Language (SQL) to create tables within the database.
CREATE TABLE Syntax
- The CREATE TABLE statement creates a new table by defining its structure, including column names, data types, constraints, and indexes.
INSERT INTO Syntax
- The INSERT INTO command adds data to the created table.
Extract Data
- We use SQL commands to extract data from the database.
SELECT Command
- SELECT is the primary command that is used in SQL to retrieve data. Often with the WHERE keyword, to only show data if the expression is true
LIKE Operator
- The LIKE operator checks if text matches a particular pattern.
IN Operator
- The IN operator checks if a value is in a list of possible values.
ORDER BY
- The ORDER BY keyword displays results in a particular order that can be either ascending, or descending.
AS (alias)
- The AS keyword renames a column.
LIMIT and OFFSET
- The LIMIT clause restricts the number of rows a select statement returns.
- The OFFSET clause skips the offset rows before returning data from the rows.
Aggregate Data
- Aggregate functions work over multiple rows and combine them, including count(), sum(), avg(), min(), and max().
HAVING Clause
- The HAVING clause occurs after the aggregates have finished, similar to WHERE.
VIEW
- View is a saved query that works like a regular table, except the rows are not able to be edited; it’s useful if there is a large and complex query.
View
- A view is a saved query, with the rows not able to be edited.
Topic 4: Extracting Data From Multiple Tables
Combining Tables
- Tables are often needing to be combined using a JOIN to connect the tables that contain primary and foreign keys. Also referred to as an ON Clause
ON Clause
- ON clauses connect the primary and foreign keys
USING Clause
- USING clause replaces ON clause, which only can work if the column is in two tables
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.