computer systems + HWDoTW(p2) Flashcards

(30 cards)

1
Q

Definition of hardware

A

Hardware are the physical components of the computer system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Definition of software

A

Software is program code, sequences of instructions executed in order to perform a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is system software?

A

System software:
* controls and maintains the cs and components
* Includes the computer’s OS
* Includes utility programs, library programs, and translators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is application software?
+ examples

A

Application software:
* Software that complete a specific task for the user
* Ex. word processors, web browsers and speadsheet software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do utility programs do?

A

complete housekeeping tasks:
* data backup
* defragmenting hard drives
* data compression
* encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do libraries do?

A

Libraries hold frequently used functions

Can simplify application development

Must first be imported within program code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do translators do generally? (compiler, assembler, interpreter)

A

Translators are pieces of software that translate between different types of language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the (general) role of the operating system?
&specific roles

A

The operating system hides the complexity of the hardware by providing a virtual machine

including:
* resource management
* processor scheduling
* memory management
* I/O devices
* handles interrupts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How have different types of programming languages developed?

A

Early computers could only be programmed using low-level languages

low level languages are:
* directly manipulated by the processor
* difficult to read, write, and debug
* prone to errors

When high level languages were developed, it made programming a lot easier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Low level languages (definition and examples)

A
  • programs are processor specific
  • programs directly affect the processor

examples:
* machine code
* assembly language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is machine code? + what is it used for

A
  • Uses only 1s and 0s to represent instructions
  • Directly manipulates a computer’s processor
  • Programs are very long and difficult for humans to understand, this makes them prone to errors and very difficult to debug
  • Useful for embedded systems and real-time applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is assembly language?

A
  • Developed to simplify writing programs
  • Mnemonics are used instead of binary instructions that machine code uses, which make it more compact and less error prone than machine code
  • Each instruction has a 1-to-1 correlation to a machine code instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

High level languages (definition and examples)

A
  • Not platform specific
  • Must be translated into machien code by a compiler or an interpreter before execution
  • Use english instructions and mathematical symbols in instructions
  • Easy for humans to learn, understand and debug (features like variables, indenting and commenting help)
  • Have built in functions that save time when programming
  • examples: C#. Java, Pascal, Python, VB.Net
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Imperitive high level languages

A

Imperitive high-level languages are formed from instructions that specify how the computer should complete a task, rather than what a computer should do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Advantages and disadvantages of low-level languages

A

Low-level
Advantages:
* Code is executed directly by processors (in machine code)
* Assembly language has a 1-to-1 correlation with machine code, meaning it can be translated quickly

Disadvantages:
* Not portable, programs are specific to certain processors
* Code is harder for humans to learn, understand and remember
* Debugging is very hard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advantages and disadvantages of high-level languages

A

High-level
Advantages:
* Portable, programs are not specific to certain processors
* Easy to understand for humans
* Indentation, named variables and commenting make debugging easier

Disadvantages:
* A compiler or interpreter must be used to translate source code into object code before it is executed, taking more time

17
Q

What does an assembler do?

A

Translate assembly language into machine code
* Are platform specific
* Each assembly code instruction has a 1-to-1 relationship to a machine code instruction
* Translation is fairy quick and straightforward

18
Q

What does a compiler do?

A

Translate high-level languages into machine code
* Are platform specific
* Take a high-level program as their source code
* Check the source code for errors, line by line
* Translates entire program at once
* If the source code contains an error, it will not be translated
* Compiled programs can be run without any other software present

19
Q

What does an interpreter do?

A

Translate high-level languages into machine code
* Translate line by line
* Have procedures to translate each kind of program instruction
* Checks for errors as they translate
* Can partially translate source code containing errors
* Both program source code and the interpreter itself must be present
* This results in poor protection of the souce code

20
Q

Differences between compilation and interpretation & examples

A

Translation
* Compiler - checks source code for errors line by line before translating all at once
* Interpreter - checks source code for errors as it translates line by line

Software needed
* Compiler - Doesn’t need source code or compiler to be present for execution
* Interpreter - Both source code and interpreter must be present for execution

Safety of source code
* Compiler - Source code is protected from extraction
* Interpreter - Little protection of source code

Examples
* Compiler - faster runtime performance because the entire code is translated before execution
* Interpreter - quick testing and iteration of code and immediate feedback

21
Q

How do compilers with intermediate languages work?

A
  • Machine code is not produced straight away
  • Translate source code into an intermediate language, ex. bytecode
  • A virtual machine is used to execute the bytecode on different processors
  • Each different processor intruction set has its own virtual machine
  • Allows for platform independence
22
Q

What is the difference between source code and object (executable) code?

A

Source code: input to a translator
Object code: translator’s output

23
Q

Principles of operation of a barcode reader

A

Consist of:
* Laser light source
* lens
* photodiodes
* mirror

Operation:
1) Mirror directs light from laser onto barcode
2) Light reflected by barcode passes through the lens (light portions reflect the most light, the dark sections absorb incident light), and is incident on the photodiode which turns light into electrical charge
3) The electrical charge is measured and processed to form a digital signal, representing the content of a barcode

24
Q

Principles of operation of a digital camera

A

Consist of:
* a lens that focuses light onto a sensor
* a shutter which controlls the path of light between the lens and the sensor

Operation:
1) sensors convert incident light into electrical charge
2) charge builds up in each cell, representing a pixel in the image (in colour cameras there are multiple cells for each pixel)
3) when the photo is taken, the charge in each of the cells is measured and converted to a digital value which is processed by the camera and stored as a digital image

25
Principles of operation of a **laser printer**
Consists of: * laser light source * mirror * drum * toner roller * fusers Operation: 1. The drum is electrically charged all over before the laser is directed at it's surface by a mirror 2. Areas which the laser shines are discharged, leaving an impression of the page, in electrical charge, on the drum 3. The toner roller dispenses charged toner(a plastic powder) onto the drum, which is attracted to the charged portions of the drum 4. The toner is applied to the paper by the drum 5. paper is heated by fusers, fixing the toner to the paper
26
Principles of operation of an **RFID**
(Radio frequency identification) Method of transferring information wirelessly between a tag and a reader. Consists of: * a chip which contains a small amount of memory * attached to the chip is a coil of wire which acts as an antenna Operation: 1. The reader emits radio waves, picked up by the tag's antenna 2. The power induced powers the chip 3. The chip uses its antenna to emit a radio wave, containing the info on the chip 4. the wave is picked up by the reader, which decodes the info and returns it to a computer
27
Principles of operation of a **hard disk drive**
Operation: 1. Has circular platters, made of magnetic material 2. above each platter, an actuating arm hovers, on which a read/write head is mounted 3. The read/write head changes the magnetic polarity of parts of the platter 4. Data is written in concentric tracks, which are each divided into sectors 5. The platter rotates thousands of times per minute, allowing for good read and write speeds **Capacity can be increased by:** * adding more platters * decreasing the width of tracks
28
Principles of operation of an **optical disk**
**Read-only disks** 1. Store data using lands and pits 2. pits burnt into the disk by a high-power laser 3. a low-power laser is passed over the surface of the disk: * when the laser is incident on a land, the light **reflects back onto a photodiode** * when the laser is incident on a pit, the light is **scattered in different directions** \4. the patern of reflections and scatters is converted into a digital signal **Recordable and rewritable disks** 1. a pattern of reflections and scatters is created by a dye on the disk's surface * no dye: laser reflected off the surface of the disk * dye: laser absorbed by the dye and not reflected **Recordable optical disks** use photosensitive dye which changes from opaque to transparent under a high-power laser **Rewritable disks** use a phase-change dye that can be converted multiple times between transparent and opaque, depending on the temperature it is heated to
29
Principles of operation of a **solid state drive (SSD)**
Consist of **non-volatile and NAND flash memory cells** and a **controller** that manages the structure of data on the drive 1. **floating gate transistors** are memory cells which store info by trapping electrical charge 2. Data is stored in **pages**, which then form **blocks** 3. They are not capable of overwriting data: whole page is erased to write new info Because they have** no moving parts** they are: *Capable of much higher read and write speeds than HDDs *Suitable for use in portable devices like phones and tablets **Lower latency and faster transfer speeds than a magnetic disk drive**
30
Compared **capacity and speed** of access of **secondary storage devices** and their **suitability**
**Typical capacity:** HDD - high SSD - low OD - very low **Read/write speeds:** HDD - good SSD - very high OD - relatively low **Latency:** HDD - high SSD - very low OD - high **Portability:** HDD - no SSD - yes OD - kind of **Power consumption:** HDD - high SSD - low OD - high **Suitability:** HDD - desktop PCs and servers SSD - laptops, phones, tablets OD - sharing and distributing small volumes of data