WEEK 1
This is a summary of Machine Language, Assembly Language, and High-Level
Languages.
This is a typed-up version of my CS107 lectures during Week 1, but it is being put online
for all of my classes, because the information will be helpful in understanding how
computers process the programs that you'll be writing this semester and in the future.
-----------------------------------------------------------------------
---
MACHINE LANGUAGE, ASSEMBLY LANGUAGE, HIGH-LEVEL LANGUAGES
Bit = "binary digit" = 0 or 1
Computers store information in bits.
Usually, bits are grouped into units of 8 (one "byte").
Byte = 8 bits
Kilobyte = 2^10 = 1,024 bytes
Megabyte = 2^20 = 1,048,576 bytes
Binary = base-2 number system = used by computers = digits are 0 and 1
Decimal = base-10 number system = used by people = digits are 0 to 9
Hexadecimal = base-16 number system =
= easy way for programmers to write binary numbers =
= digits are 0 to 9, and A to F
Examples:
decimal 19, written in binary, is 10011, because 1*(2^4) + 1*(2^1) +
1*(2^0)=19
decimal 19, written in decimal, is 19, because 1*(10^1) + 9*(10^0) = 19
decimal 19, written in hexadecimal, is 13, because 1*(16^1) + 3*(16^0)
= 19
RAM = random-access memory.
It's possible to read data from, and write data to, RAM memory.
Therefore, your program, and any data your program uses or needs,
is loaded into your computer's RAM memory.
The more RAM memory your
computer has, the bigger your programs and data can be.
ROM = read-only memory.
You can read the data values, but you can't change them.
Usually, this is where important system-related programs and data are
stored, by the company that made your computer.
CPU = Central Processing Unit.
Examples: the Intel Pentium microprocessor for PCs, the Intel 486