{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

WEEK 1 - WEEK 1 This is a summary of Machine Language...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
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
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
microprocessor for PCs, the Sun Ultra SPARC processor for UNIX machines, the G5 processor for Macs, etc. The CPU usually looks like a black plastic square or rectangle, usually about the size of a half-dollar, with short metal wires or connectors coming out of its sides. Inside this case is the CPU's electronics. The CPU is the "brain" of a computer -- it controls everything, does all the math, controls the reading/writing of data, executes the instructions in your program, etc. MACHINE LANGUAGE -- ------------------- 1. Each type of CPU is designed to only do certain things (i.e., to only perform certain tasks, such as "load a number from memory," "store a number into RAM memory," "add two numbers," "multiply two numbers," etc.) 2. But since CPUs can only understand numbers (patterns of "bits"), the commands that a programmer gives to the CPU must be given in terms of numbers. Therefore, a CPU's designers must pair a specific number code with each thing that the CPU can do.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern