Class Notes Flashcards

1
Q

How many values does a bit represent

A

Two values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many values does 2 bits represent

A

4 values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many values does 3 bits represent

A

8 values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What numbers define the binary number system

A

0,1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you determine largest value if you have a base number

A

The largest value is 1 less then the base value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the largest number for base 10

A

9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the largest number for base 8

A

7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What number of values do 4 bits have

A

16 values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is 1 byte equal to?

A

8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is 1 byte considered

A

The smallest addressable memory unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many values are in one byte

A

256 values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is 1MB in base 10

A

10^6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is 1GB in base 10

A

10^9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is 1TB in base 10

A

10^12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can values be both positive or negative?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Values can either be …

A

Characters or numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are numbers with no decimal called

A

Intergers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are numbers with a decimal called

A

Floating point numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the 4 interger types

A

byte
short
int
long

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the default type for intergers

A

int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How many bytes does a byte represent

A

1 byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How many bytes does a short represent

A

2 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How many bytes does an int represent

A

4 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How many bytes does a long represent

A

8 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the two types of floating point numbers/types
Float and a double
26
How many bytes does a float represent
4 bytes
27
How many bytes does a double represent
8 bytes
28
If the first bit is 0 in an interger, is it positive or negative
Positive
29
If the first bit is 1 in an interger is it positive or negative
Negative
30
In an interger what does the first value represent
Sign bit
31
In an interger what does the second value represent
Exponent
32
In an interger what does the remaining bits represent (not the sign or exponent)
The mantissa
33
What is the default type for floating point numbers
Double
34
What are fractional numbers
Numbers with decimals
35
What does && mean
And
36
What does ll mean
Or
37
What would 12 be interpreted as
An int
38
What would 12.0 be interpreted as
A double
39
What are the 8 primitive built in types for Java
Byte, short, int, long Float, double Char Boolean
40
What is a char used for
To store 1 character.
41
How much space does a char occupy
1 byte
42
What is Boolean used to represent
True or false
43
What are types in italics called
Interfaces
44
What type of class would be used to represent someone's name
String class
45
What does ' ' specify
A character
46
What does 'A' specify
The a character
47
What is \ called
The escape character
48
What does \ ' show up as
'
49
What does \ " show up as
"
50
What does \n do
New line
51
What does \t do
Tab
52
What do capital letters indicate when discussing types
A non primitive type
53
What are types
Values such as intergers
54
What happens if you introduce operations to a type
It then becomes a data type
55
What is a data type
A type + an operation
56
Describe programming in the 70s
Programming languages were called machine language., then assembly language. It was required that you use an assembler to compile and convert to binary to be more efficient.
57
What were low level programming languages
the early programming languages of the 70s
58
What are some examples of high level programming languages
Java, C, C++, Pascal etc
59
What is a high level programming language
Resembles the english language so it is easy for the programmer to understand
60
What was FORTRAN
an old school business oriented language
61
What was the disadvantage to the early programming languages
The disadvantage to the old programming languages was that they were very procedural and required knowing all of the procedures and how to use them
62
What are Java and C++ considered
project oriented languages
63
What is the difference between C and C++
C++ is the same as C but object oriented features included
64
What is the disadvantage to C++
Very complex after you get past introductory concepts
65
What was java created for
Created for unifying the programming behind microwaves, toasters etc
66
Was java created for a specific OS
No, it was created for a virtual machine
67
What would the purpose of Java's virtual machine be
Would translate to other OS and served to unify the whole operation
68
What is the difference between print and println
Println will print something and place it on the same line.
69
How do you comment out lines of code
// infront of the line or after curly bracket to comment out all of the code.
70
How do you choose variable names
1) name of variable must begin with a letter (can be of any length) 2) may only contain letters, digits, and underscore character
71
What is it called when you assign a number to a variable
initializing