Computer Science topic 1 -5 Flashcards
2.1.2 Two’s complement
- -> The MSB is a minus number as well as a sign bit.
- -> always remember to write the + sign
negative numbers:
1) convert to the unsigned equivalent 8 bit binary
2) flip the bit
3) add 1 arithmetically
2.1.3 denary to binary
2.1.5 overflow error
Overflow error means that the result of the calculation is too large for the space allocated.
The way a computer handles this will depend on how its set up:
It could crash and report an overflow error.
It could truncate the answer.
It could wrap the number around back to 0.
2.1.6 hexadecimal to binary
convert C3 to binary
1100 0011
1) convert each digit to denary
2) convert denary to binary
3) combine to get binary number
2.1.6 binary to hexadecimal
convert 1011 0011 to hexadecimal
B3
1) split the byte into two nibbles
2) convert each to denary
3) add these together to get hexadecimal
2.2.1 ASCII
ASCII (American Standard Code for Information Interchange)
ASCII enables computing devices to communicate with another and to translate their communication into identical information.
Limitations:
- ascii is only 7 bits, so can only store up to 128 unique characters.
- other languages have characters that can be represented with only 7 bits.
- more bits are needed to represent some alphabets.
- 2.2 - define:
a) pixel
b) resolution
c) colour depth
a) pixel
- a picture element, a tiny square of colour
b) resolution
- describes how tightly packed the pixels are
- describes the number of pixels per inch.
- if you enlarge an image it becomes more pixelated and has a lower resolution.
c) colour depth
- the number of bits used to encode the colour of each pixel in a bitmap image.
the more bits used to encode the colour, the greater the number of actual colours that can be represented in the image so that is is more detailed.
2ⁿ
2.3.1 units
Kiss My Gross Toes
Kibibyte
Mebibyte
gibibyte
tebibyte
2.3.2 lossy compression
+ bigger reduction in file size
+ data removal is not noticeable human eye or ears
- removes actual data
- original cant be reconstructed
uses: image size and digital sound recording
examples: MP3 audio files and JPG image files
2.3.2 lossless compression
+ encodes data, rather than removes it
+ original can be reconstructed exactly
- not as much reduction as lossy compression
uses: text files and graphic files with a low colour depth
examples: compressed text files, GIF and PNG image files and FLAC and ALAC audio files.
- 3.2 compression
a) reasons for compressing files
b) advantages of file compression
a)
1) reduce storage requirements
2) reduce network transmission time
b)
- less internet bandwidth is used when files are downloaded
- transfer time is faster
- less storage space is needed
- smaller files reduce congestion on the internet
- audio and video files can be streamed
3.1.1 von Neumann
a MEMORY UNIT into which programs instructions and data loaded prior to being processed.
a PROCESSING UNIT to decode and execute program instructions fetched from memory one at a time.
INPUT and OUTPUT mechanisms to input programs and data and output the result of processing
3.1.1 main memory
short, term working memory
only holds the instructions and data that the CPU is currently using.
consists of a collection of storage location, each with a unique address.
a storage location and hold a program instruction or an item of data.
referred to as RAM
primary storage because the CPU had fast, direct access to it.
volatile
3.1.1 Central processing unit (CPU)
Buses, control unit, clock, ALU, registers
buses - work together to transfer data between the CPU, main memory and input/output devices.
control unit - fetches program instructions from main memory one a time and decodes them and directs the operations of the other parts of the system to execute them.
clock - synchronises the actions of the CPU
ALU - performs the actions of the CPU.
Registers (immediate access storage) - memory that is extremely fats.
some are general purpose while other are have specific functions.
3.1.1 Buses
control bus
signals are carried between the CPU and other parts of the computer system.
address bus
holds the memory address of the memory locations that the CPU needs.
data bus
transfers program instructions and data between memory and the CPU.
3.1.1 Fetch decode execute
The Fetch stage
(adress,control,data bus) abcd
1) the CPU places the memory address of the next instruction on the address bus.
2) the control unit sends a read signal along the control bus to memory.
3) the content of memory location is transferred along the data bus to the CPU, where its stored in a register.
The decode stage
- the control unit decodes the instruction by looking it up in the CPU’s instruction set
The execute stage
- the CU then carries out the instruction.
- it instructs the ALU if calculations need to be performed.
3.1.2 Why secondary storage is needed
RAM is volatile.
it loses its contents when the power of switched off.
Secondary storage provides non-volatile storage that can be used to write and rewrite data, so that it does not vanish when the power is turned off.
3.1.2 differences between primary and secondary storage
primary
- volatile and power dependent
- short term
- directly accessible by CPU
- Limited storage capacity
- Limited scope for expansion.
Secondary:
- non volatile
- long term
- programs and data must be transferred to memory in order for them to be accessed by the CPU.
- large storage capacity
- can be expanded by using external device (USB)
3.1.2 advantages and disadvantages of optical
+ cheap yo produce
+ thin and lightweight
+ portable
- slow to access
- low capacity
- prone to scratches
3.1.2
advantages and disadvantages of magnetic
+ high capacity
+ quick to access, providing the disk is defragmented periodically.
- Has moving parts that will eventually fail.
3.1.2
advantages and disadvantages of solid state
\+ quick to access \+ no moving parts so reliable \+ quit \+ low power requirements \+ no need to defragment
- expensive
- has a limited number of read write cycles
3.1.2
magnetic storage
Magnetic media are coated with a substance that can be magnetised.
Magnetic storage technology works by magnetising parts of this substance as north and south poles to represent binary 1s and 0s.
Examples include: hard disk drive, tape drive and cassette.
3.1.2 optical storage
Optical media consists of a platter with a flat reflective surface.
Optical storage technology works by using a laser to burn ‘pits’ into the flat surface.
The reflective areas between pits are known as ‘lands’.
A laser is directed onto the medium’s surface.
When it hits land, a beam reflects (this is read as binary 1).
When it hits a pit, the beam does not reflect (this is read as binary 0).
Examples: CD and DVD.
3.1.2 solid state storage
Solid state media consists of silicon chips that feature a special kind of transistor called NAND flash.
This type of media is called ‘solid state’ because it has no moving parts.
Solid state technology works by using a large electric current to force electrons through a barrier trapping them in positions called pools.
A full pool - 0.
An empty pool - 1.
Examples include: SSD card, USB, SD memory card and flash storage.