Computer systems Flashcards
Hardware
Any physical parts of a computer and related devices
Software
Computer programs in all forms (non-physical)
External hardware
Monitors, keyboards, mouse, printers, webcam etc
System software
Operating systems, utility programs, libraries, translators (compilers, assemblers, interpreters)
Internal hardware
Motherboards, hard drives, ram, etc
Application software
Games, browsers, media players, word processors, email, IDEs, apps, etc
Utility programs
Anti-virus, firewalls, device drivers, compression, backup, etc
Translators
Compilers, interpreters, assemblers
Anti-virus
Any programs that help to remove programs designed to harm the computer
Disk defragmentation
A computer hard disk will become fragmented when files are downloaded and deleted, eventually programs will be split across the disk into smaller chunks which will slow the disk
Compression programs
Compression programs apply compression to media to reduce its file size
File managers
Allow users to easily rename, move, delete, copy or modify files
Firewalls
Help to prevent unauthorised access to a computer
Backup programs
Any programs that allow manual or automatic backups to another disks or other storage devices/cloud storage
Translator
Any program that translates source code into machine code
Assemblers
Converting assembly code into machine code
Compilers and interpreters
Converting high-level languages into object code/machine code
Interpreters
Convert source code immediately into machine code
Compiler
Converts source code into object code which can be slow, although object code runs a lot faster than interpreted code.
Libraries
Libraries are pre-compiled and pre-tested sets of code from other programmers
The purpose of the operating system
Manage the processor, manage the memory, manage external devices, provides a platform for software and utility programs, provides networking, manages security, provides a user interface
Paradigm
An example of a way of doing things
What was the only way to program when computers were first invented
Work in binary numbers that represented different instructions (Machine language)
Assembly language
Allows the user to write groups of letters for instructions instead of binary and is executed as machine language
Low level language
Machine language and assembly language
High-level languages
Languages that had a one-to-many relationship with machine code (Fortran, C, Pascal)
Imperative language (often referred to procedural language)
Program code is executed one line at a time. The code is written by a programmer using sequence, selection, iteration and subroutines / procedures
How does machine code work
User inputs binary and is then translated into electrical signals
How does assembly language work
Input 3 letter words (known as mnemonics) and is then looked up in a table and then translated to machine code
Advantages of machine code/assembly
Very efficient, direct access to system-level features, in complete control of code
Disadvantages of machine code/assembly
Machine dependant, few programmers can code efficiently in assembly, tedious to write and bug prone, difficult to understand
Advantages of interpreters
Useful when writing programs, no need for time consuming recompilation every time an error is found
Advantages of compilers
Generated object code is kept on disk, object code executed much faster once created, object code can be distributed to others, relatively secure
What is intermediate code?
a generic “half-way” standard language that can be translated into machine code
What is intermediate code designed to run of
virtual machine
What is the purpose of a virtual machine
To take generic intermediate code and translate it to specific machine code
What is the extra layer that JVM (Java virtual machine) has to translate intermediate code to machine code and what does it do
The extra layer is called “bytecode” and it allows Java to run on all platforms that have a JVM
What does NOT/negation do
Reverses the output (if A = 0 then A = 1)
What is the notation for NOT/negation
A line above the value, for example,
_
A
What does AND/conjunction do
Compares 2 values together, if both are true/false then the output will be true/false
for example,
A = 1 and B = 1 makes the output 1 A = 1 and B = 0 makes the output 0
What is the notation for AND/conjunction
A filled incircle between each input
A O B
What does OR/disjunction do
Compares both inputs, if either are 1 then the output is 1
if both are 0 then the output is 0
What is the notation for OR/disjunction
A plus sign
A + B
What does XOR/Exclusive disjunction do
If A or B are 1 the output is 1
If A and B are 1 the output is 0
If A and B are 0 the output is 0
What is the notation for XOR/Exclusive disjunction
A plus sign with a circle around
A +O B
What does NAND do
Gives the result of AND and then is followed by a NOT
A = 1 NAND B = 1 outputs 0 A = 1 NAND B = 0 outputs 1
What is the notation for NAND
A filled in circle with a line across everything being negated
______
(A O B)
What does NOR do
Gives the result of OR followed by a NOT
A = 1 B = 1 output is 0 A = 1 B = 0 output is 0 A = 0 B = 0 output is 1
What is the notation for NOR
A plus with a line across everything being negated
_____
A + B
What is a half adder
A circuit able to take a 2-bit input and produce a 2-bit output which is the correct result of a binary addition of the two inputs.
What is a half adder
A circuit able to take a 2-bit input and produce a 2-bit output which is the correct result of a binary addition of the two inputs.
What is a full adder
A full adder combines two half adders, Now you can add a 3-bit input to include the inputs A and B and a carry bit C
What are concatenating full adders
Connect multiple full adders together to be able to input the carry bit into subsequent adders along with 2 brand new inputs
What is a flip-flop
A basic circuit which can store one bit and flip it between 0 and 1
What are the 2 inputs of a flip-flop
Control input (often labelled D) Clock signal
What does joining together multiple D-type flip-flops allow you to do
Store more bits
for example, 16 d-type flip-flops in sequence can store 2 bytes or 16 bits
What is DeMorgan’s law
Either logical function AND or OR may be replaced by the other
for example, NOT(A AND B) = (NOT A) OR (NOT B)
another example, NOT (A OR B) = (NOT A) AND (NOT B)
What is the method for DeMorgan’s law
- Change OR to an AND (or vice versa) NOT(A OR B)
- NOT the terms on either side of the operator NOT(A AND B)
- NOT everything that has changed NOT(NOT(A AND B))
- Get rid of any double negation NOT(NOT(NOT(A AND B)))
- Get rid of any unnecessary brackets NOT(A AND B)
NOT(A AND B)