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
Q

What are the two types of floating point numbers/types

A

Float and a double

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

How many bytes does a float represent

A

4 bytes

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

How many bytes does a double represent

A

8 bytes

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

If the first bit is 0 in an interger, is it positive or negative

A

Positive

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

If the first bit is 1 in an interger is it positive or negative

A

Negative

30
Q

In an interger what does the first value represent

A

Sign bit

31
Q

In an interger what does the second value represent

A

Exponent

32
Q

In an interger what does the remaining bits represent (not the sign or exponent)

A

The mantissa

33
Q

What is the default type for floating point numbers

A

Double

34
Q

What are fractional numbers

A

Numbers with decimals

35
Q

What does && mean

A

And

36
Q

What does ll mean

A

Or

37
Q

What would 12 be interpreted as

A

An int

38
Q

What would 12.0 be interpreted as

A

A double

39
Q

What are the 8 primitive built in types for Java

A

Byte, short, int, long
Float, double
Char
Boolean

40
Q

What is a char used for

A

To store 1 character.

41
Q

How much space does a char occupy

A

1 byte

42
Q

What is Boolean used to represent

A

True or false

43
Q

What are types in italics called

A

Interfaces

44
Q

What type of class would be used to represent someone’s name

A

String class

45
Q

What does ‘ ‘ specify

A

A character

46
Q

What does ‘A’ specify

A

The a character

47
Q

What is \ called

A

The escape character

48
Q

What does \ ‘ show up as

A

49
Q

What does \ “ show up as

A

50
Q

What does \n do

A

New line

51
Q

What does \t do

A

Tab

52
Q

What do capital letters indicate when discussing types

A

A non primitive type

53
Q

What are types

A

Values such as intergers

54
Q

What happens if you introduce operations to a type

A

It then becomes a data type

55
Q

What is a data type

A

A type + an operation

56
Q

Describe programming in the 70s

A

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
Q

What were low level programming languages

A

the early programming languages of the 70s

58
Q

What are some examples of high level programming languages

A

Java, C, C++, Pascal etc

59
Q

What is a high level programming language

A

Resembles the english language so it is easy for the programmer to understand

60
Q

What was FORTRAN

A

an old school business oriented language

61
Q

What was the disadvantage to the early programming languages

A

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
Q

What are Java and C++ considered

A

project oriented languages

63
Q

What is the difference between C and C++

A

C++ is the same as C but object oriented features included

64
Q

What is the disadvantage to C++

A

Very complex after you get past introductory concepts

65
Q

What was java created for

A

Created for unifying the programming behind microwaves, toasters etc

66
Q

Was java created for a specific OS

A

No, it was created for a virtual machine

67
Q

What would the purpose of Java’s virtual machine be

A

Would translate to other OS and served to unify the whole operation

68
Q

What is the difference between print and println

A

Println will print something and place it on the same line.

69
Q

How do you comment out lines of code

A

// infront of the line or after curly bracket to comment out all of the code.

70
Q

How do you choose variable names

A

1) name of variable must begin with a letter (can be of any length)
2) may only contain letters, digits, and underscore character

71
Q

What is it called when you assign a number to a variable

A

initializing