CSCI 111 Ch. 1-2 Quiz Flashcards
(85 cards)
a number system consists of (2 things)
- set of valid characters
2. place values
the base-10 number system is also known as
decimal
what are the valid characters in the base-10/decimal number system?
0-9
in the base-10/decimal number system, place values increase by orders of
10 (10^0, 10^1, 10^2 and so on in the left direction)
Why do we use base 2 (binary) instead of base 10 (decimal)? What does this mean?
Electrostatic Discharge (if electronics are exposed to ESD, voltage can spike -> in base 10, 1v to 8v is a jump of 8000)
the base-2 number system is also known as
binary
what are the valid characters in the binary number system?
0 and 1
in the base-2/binary number system, place values increase by orders of
2 (2^0, 2^1, 2^2 and so on in the left direction)
what is 1 byte equal to (in terms of bits)?
8 bits
what is 1 word equal to (in terms of bytes)?
2 bytes
what are the steps for converting from decimal to binary?
- identify the largest place value that is less than or equal to your number
- set the bit to 1 for that place value
- subtract the place value from your number
- repeat steps 1-3 until the number is zero
- set the remaining bits to zero
the base-16 number system is also known as
hexadecimal
what are the valid characters in the hexadecimal number system?
0-9, A-F
in the base-16/hexadecimal number system, place values increase by orders of
16 (16^0, 16^1, 16^2 and so on in the left direction)
in converting hexadecimal to binary, we have to look at it in terms of ? bits because 16 = 2^4
4
what are the place values for the binary > hexadecimal conversion chart?
8 4 2 1
Java is an ? and ? language that uses an ? / text editor such as Notepad ++
object oriented (OO), compiled, Integrated Development Environment (IDE)
what is the basic skeleton of a java code?
class name & main method
to invoke the java compiler, ? which creates MyProgram.class
javac MyProgram.java
to execute the program, ?
java MyProgram
what are computer programs (aka software)?
instructions to the computer/how we tell the computer what to do
programs are written using ?
programming languages (e.g. Java)
? is a set of primitive instructions built into every computer. it is in the form of ?
machine language; binary code
? were developed to make programming easy
assembly languages