Computer architecture Flashcards
(37 cards)
What are the 3 main components of a CPU???
CU[control unit]
ALU[Arithmetic and logic unit]
registers
What is the role of ALU???
The role of the ALU is for computing arithmetic and logic gate based logic
What is the role of the control unit???
The CU directs the operation of the CPU, interpreting instructions from programs and coordinating the activities of other components.
It manages the flow of data and controls signals to and from other parts of the CPU
What is the role of the registers???
temporally holds data while a CPU is computing instructions - same as RAM but doesn’t hold the data for as long
What is the role of RAM???
RAM is a type of volatile memory used to store data and programs temporarily while the computer is running
What are three types of ram???
Vram
Dynamic Ram
Static Ram
What is the role of a data bus???
The data bus carries data between the CPU, memory, and other components. It determines how much data can be transferred at once.
What is the role of a memory bus???
The address bus carries memory addresses from the CPU to other components. It determines how much memory can be addressed.
What is the role of a control bus???
The control bus carries control signals from the CPU, indicating what operations to perform (read, write, etc.).
How does an interpreter work???
An interpreter directly executes code line by line. It doesn’t convert the entire program into machine code
What programming languages that commonly use interpreters???
interpreters are often used in dynamic languages like Python and JavaScript.
What are some pros and cons of interpreters???
Pros: Easier debugging, immediate execution, flexible code modifications.
Cons: Slower execution compared to compilers, as each line is interpreted individually.
How does an complier work???
A compiler translates the entire source code into machine code, creating an executable program
What programming languages that commonly use complier???
Compilers are commonly used in languages like C, C++, and Java.
What are some pros and cons of compliers???
Pros: Faster execution, optimized code, doesn’t require source code for execution.
Cons: Longer compilation time, harder to debug, requires recompilation for code changes
What are binary numbers???
Computers use binary (base 2) to represent data. A binary number consists of only 0s and 1s.
What are positive integers[denary]???
Positive integers are whole numbers greater than zero. They can be represented in binary.
How to convert from decimal to binary???
use either the division method or subtraction method:
To convert in division method, decimal number to binary, repeatedly divide by 2 and track the remainders. Reverse the order of remainders to get the binary representation.
or for the subtraction method if the positive integer is > than the number of bytes a 1 has it = 0 else
How are real numbers represented within a computer???
Real numbers can have fractional components. They are often represented using floating-point notation.
describe floating point notation
This uses scientific notation with a base (binary) and an exponent. It’s commonly used to represent real numbers in computers
How does a computer represent text???
Text is represented using character encoding schemes like ASCII and Unicode.
What are some examples of text encoding schemes and how do they work???
ASCII: Represents characters using 7 or 8 bits, allowing for 128 or 256 different characters.
Unicode: A more extensive encoding scheme allowing for thousands of characters, including those from different languages.
How do vector graphics get used to represent images???
Vector graphics use mathematical equations to represent images. They are resolution-independent and often used for logos and scalable graphics
What are some advantages/disadvantages of vector graphics???
Advantages: Can be scaled without losing quality, smaller file sizes for complex graphics.
Disadvantages: Not suitable for detailed or complex images like photographs.