Thursday, April 9, 2015

Fundamentals of Computers

Pushing the power button starts up your computer. The symbol on the power button is a combination of a 0 (for off) and a 1 (for on). There are two states on a computer - on or off, represented by a 1 and a 0, respectively. From this, the binary system was made. For example, if you want to type the letter 'A,' there is an 8-character binary code of zeroes and ones. Each 0 or 1 is called a bit, and one of those 8-bit sequences is called a byte, which is a unit of memory. All the keys on the keyboard are represented by bytes.

A computer can understand the high level language we are inputting. The compiler and interpreter are 2 programs that convert everything we type into binary. The compiler takes the entire program and checks it for errors. Then, the compiler converts it to machine language all at once. The interpreter checks what we type line by line, so if there is an error in one of our lines, it will show up immediately. The high level language that we type is called the "source code." The compiler or interpreter converts it to code that the computer can understand, or object code/binary code.

No comments:

Post a Comment