Thursday, 28 November 2013

Development software

Development software

EDITORS:    you use editors to write programs, some editors have pretty printing, where it uses different colours for key words and helps you know if you did the code correct

COMPILERS: compilers are for when you use code that are closer to English, this is so you can program easier and is called source code, a compiler converts this source code in to machine code

INTERPRETERS: they basically do the same thing as compilers except they execute the code as you go, this gives you an instant result so is easier to locate any error in your code, they are often used for debugging but they take longer to decode and use more RAM.

ASEMBLERS: in assemblers the programmer is in control of every step, unlike all the others it uses low-level code that means, each language instruction codes for one machine instruction, this means it takes ages to write code for anything.

LINKERS:  linkers basically glue together several codes together, the need for this is because often a program is split into different subprograms that sometimes use different programming tools and languages.
examples include: Ld_(Unix) ; GNU_linker ; Gold_(linker) ;

Monday, 25 November 2013

Data files

Data is organized into sizes, a bit is a binary number, a nibble is 4 bits, a byte is 8 binary numbers or 2 nibbles. A kilobite (kb) is 1,024 bytes A megabyte (mb) is 1024 kilobytes. A gigabyte is 1024 megabytes and A terabyte is 1,024 gigabytes

Thursday, 21 November 2013

Instructions

A program instruction is made of 2 parts, the operator or instruction and operand or memory location it should use. For example, a Byte could be split into sets of 4bites, first the operator and second the operand. 
In this example, for first 4bites: 1001 tells the CPU to Add data to the accumulator, 1010 tells it to store data from accumulator into memory location, 1011 tells it to subtract data in location from accumulator.
The second 4bites (memory location): 1100 has 7 in it, 1101 has 4 in it.
So: 1001 0011, 1011 1101, 1010 1110 says: add (0011) 3 too accumulator (total is now 3) then subtract (location 1101) 4 from accumulator (3-4) (-1) then store that data in location 1110.

Thursday, 14 November 2013

Text, pictures and sounds

ASCII
In ASCII code, they use binary to make letters punctuation and other characters.
0110 0001 codes for the letter a.   Because it has a total of 10,646 characters, it has to use two sets of bytes for each character.

Unicode isn't just for English, unlike ASCII code, it has characters for all languages, this means it has more characters. 

PICTURES 
to make pictures, you use metadata to tell you the number of binary numbers per pixel (colour depth), height of the picture and width of the picture(resolution).
For example with a 1bit colour depth then 1010 would be black,white,black,white. 

SOUND
sound can be converted into binary numbers that the computer can use by taking samples of frequency every now and then, the more often you take samples the better quality of sound but also increases the file size

Monday, 11 November 2013

Binary and hex

Are number system is currently base code 10 because we have a total of ten fingers
The Column furthest to the right is written as 1 and means 1 times 10 to the power of 0 (1).
If you go one to the left, it's written as 10 and means 1 times  10 to the power of 1 (10).
Each time you go one to the left the power increases by 1.

Binary uses a base code of 2. 
This means instead of ten to the power of whatever, it is 2 to the power of whatever. This means the column to the far right is how many times 1, the next one to the left is how many 2's ...e.t.c.
Computers use binary because there are only to things you could put in each column, 1/0 or on and off.

Hex uses a base code of 16.
This means instead of ten to the power of something it is 16 to the power of something.
The reason we use it to help us understand binary is because each character/column is for each four binary columns.
Binary addition
When adding binary numbers, if there is a 1 and a 0 then in that column you put a 1, if there are no 1's then you put a zero, if there are 2 1's then you put a 0 and carry the 1 to the next column, if there are 3 1's then you put a 1 and carry a 1 to the next column.