COMP 202 Lecture Notes - Lecture 2: Source Code, Javac, Java Bytecode

16 views6 pages
jc123 and 40170 others unlocked
COMP 202 Full Course Notes
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)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents