Thursday, 14 November 2013

Representation of Data

How is Data Represented?

A bit is a single piece of information - it's either 0 or 1.
A nibble is 4-bit. This means it's a sequence of 4 digits.
A byte is 8-bit. This codes 8 digits. 

Binary



Binary is machine code. In Binary, every digit is represented as either a 1 or a 0. Binary works in multiples of 2.
The digits: 8 4 2 1 represent a nibble. This is 4-bit.
The digits: 128 64 32 16 8 4 2 1 represent a bit. This is 8-bit.
All the digits are represented by either a 1 or  0. For example:
0001 1001 = 25
Because...
128\
|128|  64 | 32 |16  | 8 | 4|  2 | 1  |
| 0   | 0   | 0    |1     |1   |0|   0|   1|  
And 16+8+1 = 25


Hex
Instead of working in multiples of 2, Hex works in multiples of 16, it's called Base 16.

32 in decimal means that there are 3 tens and 2 left over.
32 in Hex means that there are 3 multiples of 16 and 2 left over.
So, 3 * 16 = 48, 48+2 = 50. 32 in hex means the decimal number 50.
50 is written in binary as 0011 0010. 



ASCII 

ASCII stands for American Standard Code for Information Interchange. It is used to represent characters:
  • Upper and lower case letters (52 characters)
  • All the numeric symbols (10 characters)
  • Punctuation and Space (33 characters)
  • Non printable code (32 characters) 





The http://www.mathsisfun.com/binary-number-system.html


Instruction Set 

An instruction set is the instructions used by the CPU to run a program. It tells the CPU what to do. 
To run a program, the CPU must go to the start address, from there it decodes its first instructions and finds out what to do next.
Both instructions and data are written in Binary code. The CPU cannot differentiate between the two. If the CPU expects to find instructions, it will find it and decode it.
Examples of Instruction Set
ADD - Add two numbers together.
COMPARE - Compare two numbers.
IN - Input information.
JUMP - Jump to a location in the RAM.

Instruction sets are written in 2 parts:  operator and operand.
The operator tells the CPU what to do. The operand gives the location.

The Instruction Set can be embedded in the processor or part of the software.



Representation of Images

Images are stored in binary and are made up of pixels. When representing colour, we use bits per pixel. 1 bit represents two colours: 
0 = Black
1 = White
With 8 bits, we can represent 256 colours. Colour depth is the number of bits per pixel. To get a better quality image, more bits must be used. That way, more colours can be encoded into the image.
Resolution is the number of pixels per unit of measurement. The higher the resolution, the clearer the image will be.
Meta data provides information about an image that the computer can use. Meta data includes:
  • The height and width of an image,
  • The colour depth,
  • The resolution,
  • camera used and when the image was taken.

Representation of Sound

Sound is also stored in binary. The computer converts sound (which is continuously varying data) into digital data by sampling the sound wave at regular intervals. The frequency of this is called Sample rate.
How much data is stored per second is called the bit rate. When we store the sound file, the higher the bit rate, the better quality of file. However, this will mean a larger file.


Development Software

EDITORS:
Programs must be written in an editor, like a simplified word processor. Editors can come with 'Pretty Printing'. This is very useful to the programmer as it can identify code such as strings and loops and automatically indent them or change the colour. They can also show line numbering.



COMPILERS:
High Level Languages look like normal english, they make coding much easier for the programmer. The code written by the programmer in these languages are called the source code. However, source code can't be read by the CPU so it must be translated into machine code. The compiler is responsible for this. It works as a translator, converting high level languages into code used by the CPU

INTERPRETERS:
Interpreters are similar to Compilers. However, they translate each line of code one at a time and execute the code after it has been translated. They are slower because of this. Also someone must 
have the correct interpreter to run a program.
ASSEMBLY LANGUAGE:
Assembly Language makes writing machine code programs easier. It uses mnemonics to represent machine operations. It allows the programmer complete control over their code, however it takes longer because of this.  Assembly language is unique to the processor that is running it. Assembly language must be converted into machine code by an Assembler.

LINKERS:
Linkers allow programs to be built from subprograms. Different parts of programs can be written in different languages with different tools. These are put together by Linkers, literally, linking the separate sub programs together. They also ensure that once the program has been put together, that it runs smoothly.


Thursday, 26 September 2013

A451 - Computer Hardware

What is a CPU?

CPU stands for Central Processing Unit. It is the core of every computer system.
The CPU is needed to execute programs, processing inputs and producing outputs. It does this using the fetch-execute cycle. The Data and Program which is needed is stored into the RAM (Random Access Memory). The CPU then decodes the program. The CPU understands a specific set of commands called Instruction Sets. The CPU then executes the program.

The CPU has 2 components:
  • The Control Unit - This directs systems to execute instructions using electrical signals.
  • The ALU (Arithmetic and Logic  Unit) - This carries out all the arithmetic and logical operations.


Website Links
Teach ICT
GCSE Bitesize


Binary Logic

Binary is a number system that uses the digits 0 and 1 to represent all numbers. Binary can be represented by electronic components set to ON or OFF (just like a switch).
Logic gates are found in the computer. These are electronic switches that are connected together. How the logic gates are arranged determines how it manipulates the input signal.

There are 3 main logic gates:

AND logic gate.
All outputs are 0 unless 1 in inputted in both inputs.

NOT logic gate
The NOT logic gate gives an output opposite to what is inputted.

OR logic gate
The OR logic gate is the opposite of the AND gate. All outputs are 1 unless 0 is inputted in both inputs.


AndNot logic gate

Logic Gate Website

Computer Memory

RAM - Stands for Random Access Memory. RAM is needed to run the operating system and other applications. Programs are stored in the hard drive of the computer. When they are needed they're loaded into RAM. The data in RAM can be processed by the CPU, the CPU can carry out the fetch-execute cycle. RAM memory is short term and volatile, the RAM is emptied when it's turned off. The larger the RAM on a computer, the faster it can run.
ROM - Stands for Read Only Memory. It can't be changed by a program or user, it can only be read. It stores the boot program which, in turn, boots up the operating system.
Cache - Cache memory is often built into the CPU.
Flash - Flash is a form of removal memory. A USB drive is a form of flash memory.
Virtual -

Input and Output Devices

Input - An Input Device is something that enters data into a computer.
Examples of Input Devices:
  • Keyboard
  • Mouse
  • Microphone
  • Touch Screen
Data can be entered manually or it can be automatic.

Output - An Output Device is something that displays data that has been processed. Data can be displayed in images, text, and sound.
Examples of Output devices:
  • Computer Monitor
  • Printers
  • Speakers


Specific Needs
Input and Output devices can be adapted to aid people with specific needs.
For example, a keyboard can be built with brail instead of printed letters to aid those with a sight impediment.
Instead of a mouse operated by hand, they can be operated by a foot.
These adaptations are important because they make using technology more available for people with disabilities.

Secondary Storage

Secondary Storage is a way of storing data when the power is off. Secondary storage is non volatile.
Without secondary storage, we would be unable to save data when we turn of the computer.
The hard disk is the most common form of secondary storage. It is the largest data storage device in a computer.

CD's and DVD's are optical.
The are very cheap to make and are easy to distribute.
CD's can hold around 700MB of data whereas a DVD can hold up to 4.7GB.