COMP 202 Lecture Notes - Lecture 2: Source Code, Javac, Java Bytecode
jc123 and 40170 others unlocked
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
Similar to light switches in that it can only be on or off, no in between. Computer uses ones and zeros (binary) to indicate this, where: 3425 = 3 103 + 4 102 + 2 101 + 5 100. 101110 ends in 0, so the answer should be an even number, which it is (46) Though seemingly pointless, this will be useful to understand converting decimal to binary. Base 10 means you divide by 10. Notice that taking the remainders from bottom to top, gives us the answer: 5367. First check to see if 53 is odd or even. Now check to see if 26 is odd or even. The solution is the remainders from bottom to top. This is called the remainder method (there are other ways to do the conversion) Base 2 means you divide by 2. Use the ascii (american standard code for information interchange)