Computer Systems Flashcards
What does Software mean?
A collection of procedures and rules that carry out the operation on a computer stored on an internal or external storage
What does hardware mean?
The physical components that make up a computer (Motherboards, Keyboard)
What is the relationship between software and hardware?
- Both are required during startup to boot OS
- Maintain background tasks
- Continual Checks ensure smooth performance
- Required for input, and output systems
- A mouse (hardware) picks up movement from the sensor sending the input to the PC
- Input is received and recognised by the drivers and an output is sent back
- Resulting in the cursor moving on the screen
What is system software and what are the uses?
Designed to assist the computer in the efficient execution of application programs
Such as an OS - Linux, Windows
What is application software and what are the uses?
Allows for the user to achieve specific tasks that the user wishes to perform
Such as Notion or Chrome
What is the role of utility programs?
User-operated programs to maintain the functionality of a system
Management, diagnostic tools - Task Manager
What is the role of libraries?
- Generic name for collections of programs that can develop new software
- Installed when a game or program requires it
- Can be used to automate tasks
What is the role of translators and what are the different types?
Translators
- 3 types - Compilers, Assemblers, Interpreters
- Convert source code into code a computer can understand
-
Assemblers
- Converts assembly language into machine code
-
Compilers
- Checks lines of program to see if they are following syntax
- Then converting the entire source code into object code
-
Interpreters
- Line-by-line syntax check as well as execution
- Repeated until code is complete
What is the role of the operating system?
- Collection of programs supplying an abstraction
- Abstraction through virtual machines hiding complexities
- Provides a user interface
- Manages the system processes and management
- Input and Output devices
- Memory management
- Program management
What are the levels that the OS hides from the user?
What is process management?
Process Management
- Involves scheduling and switching of programs and threads
- Gives the illusion that multiple apps are running at the same time
- Even though only each processor can only run one process at a time
- Accomplished by the process control block
- A list of tasks sorted by priority
- All programs have to be run once or a limited amount of time
- Switched in order that is efficient
- Without bringing down the efficiency of the time interactive applications
- Can be altered through user actions such as task manager
What is device management?
Device Management
- Installs the correct device drivers
- Device drivers use a layer of abstraction
- Such as the encoding of sound files to an actual speaker
- Hardware devices organised in priority
- When a hardware device performs a duty an interrupt occurs and is sent to the interrupt handler
- Interrupt handlers direct the flow of execution to the correct driver
What is memory management?
Memory Management
- OS has to keep track of all the memory available
- Avoiding programmes running out of memory and crashing
- Shifting of contents in memory to and from the hard drive
What is the provision of a virtual machine?
Provision of a virtual machine
- Abstracting all processes behind hardware and software
- Providing a UI hiding all operations
What is the role of an assembler?
An assembler is a program that takes instructions in assembly language into machine code
- Where the code is checked for syntax errors
- Support the use of pseudo-operations like reserving space for data
Instructions not directly translatable
Explain this diagram
What is the role of a compiler + advantages?
- Checks all the lines in the code
- Converts all the lines of code into machine language
- Then is executed by a computer
Advantages
- Machine codes run faster than an interpreter
- Machine code can run without a compiler
- Copies of compiled programmes are secure as no source code can be seen
What is the role of an interpreter + advantages?
- Checks line by line for invalid instructions
- Translates each statement line by line to machine code
- Executes machine code line by line
Advantages
- Programmers can debug each problem as they come across it
- Easier development
- Error in source code can be corrected
When would you want to use a compiler?
- Creating an executable file from a high-level language
- Performance boost due to already being compiled
- Giving better loading and run times (Graphics)
When would you want to use an interpreter?
- Good for debugging
- Good for compiling real-time websites (Using JavaScript)
When would you want to use an assembler?
- Good for converting assembly into opcodes
- Understandable for computers can be used to form tasks
What is an intermediate language?
- The abstract programming language used by a compiler
- In between steps when translating compute code into machine code
- So that code can e analysed and optimisations can be made during translation
What is the difference between source code and executable code?
- Source code is given to a compiler to be converted into machine code.
- Executable code indicates tasks according to encoded instructions the CPU can directly execute.
What is the truth table and shape for the NOT gate?
What is the truth table and shape for the AND gate?
What is the truth table and shape for the OR gate?
What is the truth table and shape for the XOR gate?
Known as exlusive disjusjunction
What is the truth table and shape for the NAND gate?
What is the truth table and shape for the NOR gate?
What is a logic gate circuit
A logic gate circuit is a series of logic gates which can have an input which goes through all the gates and has an output
As shown in a truth table
How do you create truth tables for logic gate circuits?
What is Boolean algebra?
- Represents values with letters and values
- Values 1 or 0 representing True and False
What is the NOT symbol?
Know negation
What is the AND symbol?
Know as conjuction
What is the OR symbol
Known as disjunction
What is the order of Precedence?
The order of precedence is the Order in which Operations occur in Boolean algebra
What are Boolean Identities
Help simplify the Boolean expression
What are the AND identities?
What are the OR identities?
What are the NOT identities?
What is De Morgan’s Law?
What is distributive rules?
What is machine langague?
- Binary
- Allows for instructions to be directly executed off the hardware
- Limited amount of people able to program
What is assembly language?
- Low level language
- One to one relationship with machine langague
- Allows for keywords to be used instead of remembering binary
What is fortran , C and pascal examples of?
- High level languages
- Each instruciton can give rise to many line of machine code
- One to many realtionship
What is the hierachy of software languages?
What are impreative languages?
- AKA Procedural langauge
- Code executed line by line
- Uses sequence, selection, iteration amdsubroutines
- C#, Java, Python
What is machine coed language?
- Least abstract
- Closed to what happens on a computer
- Binary
- Translate directly into matching electical signals
- 1 is a high voltage, 0 is a low voltage
What is assembly language?
- Uses short mnemonics
- Which is recived and looked up in a table and replaced with binary during translation
- one to one relationship
What is the advantages of assembly/machine code?
- Same effiency of execution as machine code due to its one to one nature
- Can produce very recise and locally optimised and efficient code
- Direct access to system-level geatures without a need to go thorugha softwre interface increasing speed
What are the disadvantages of assembly/machine code?
- Machine dependednt and hard to port
- Hard to find programmers that code in machine code
- Testing and writing is long due to lots of bugs
- Hard to understand leading to difficulty in modifiying and maintaining
What are the different stages that a compiler carries out?
What is bytecode?
- Type of intermediate code which is generic
- Cannot be run on its own due to translation needed
- Runs on a virutal machine which is different for different OS
- Which takes the intermediate code and translates it into specific machine code
- Allowing for cross-compatability between OS like Java does with JVM
What is half adders?
- Logic gate circuit
- Takes n a2 bit input and produces a two bit output
- Which is the correct result of a binary addition of the two inputs
- Uses a AND and XOR gate
What are full adders?
- Logic gate circuit which combines two half adders
- Add a 3-bit input to include the inputs A and B along with the carry bit C
- Extra OR gate allows you to output the carry bit
What is a Flip Flop?
- Basic circuit that can storeone bit and flip it between 1 and 0
- Has two inputs Control input (D) and a clock signal
- Clock signal provided by anthercirciot which changesstate at time intervals
What is a D-type flip flop?
- Positive edgetriggered flip-flop circuit
- Ouput can only be changed from 1 to 0 or 0 to 1 when the clock pulse is a rising or positive edge
- If its not at a rising or positive edge, the input dosent change and is held
What is the structure of the D-type flip flop?
Describe what would happen in a D-type flip flop?
How are D-Type flip flops used in memory?
- Can be used as a memmory unit
- D-type flip flopcircuit can act as 1 bit or memory
- Joining multiple multiple -type flip flop circuits you can store more like 16 bits
- Used in register memory and static RAM