Midterms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

what monoalphabetic cipher do computers use?

A

ASCII

American Standard Code for Info Interchange

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

in ASCII, how many bytes is in 1 character?

A

1 byte

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

how many bits in 1 byte?

A

8 bits of 1’s or 0’s

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

how many diff things can 1 byte represent?

A

max byte is 1111 1111 = 255 + “zero” = 256 possibilities (2^8)

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

is ASCII enough?

A

for English, yes but for Chinese (>10,000 characters), Syrillic, Japanese, Korean, etc. not enough

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

how to create more possibilities for each character?

A

add more bytes

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

how many possibilites does 2 bytes have?

A

2 bytes = 16 bits

2^16 = 65,536 possibilities (1111 1111 1111 1111 + “zero”)

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

what code do modern documents use?

A

Unicode

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

how many bytes for each character does Unicode have?

A

4 bytes = 32 bits

2^32 = around 4 billion possibilities (theory)

2^31 (reality)

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

bit map

A

black & white representation of something using bits as pixels

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

megabyte

A

1 million bytes

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

how can a large pic be more than 1 million bytes?

A

color, brightness, hue, etc.

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

how do u add color into a picture?

A

1 pixel = 3 bytes and each byte represents a primary color (red, green, blue)

in each byte, there are 256 possibilities of red, green, & blue which u can mix to create a wide array of colors

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

how come the primary colors in comp’s r diff than normal primary colors?

A

comp’s use light instead of paint

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

megapixel

A

1 million pixels

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

pixel

A

3 bytes

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

how many megabytes r in 1 megapixel?

A

3 million megabytes

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

what r the dimensions of a 1 MP square pic? a 2 MP pic? a 4 MP pic? 10 MP? 11 MP?

A

1,000 x 1,000, 1400x1400, 2000x2000, 3000x3000, 3300x3300

square root of how many pixels thr r in the pic

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

diminishing returns

A

the more MP’s we have, the less they “count” as

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

boolean logic

A

system for computers to make decisions

used in microchip design

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

gate

A

a single, physical design-making unit represented by diagrams/pic

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

OR gate

A

A + B

true when @ least one is true

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

AND gate

A

AB; true when both r true

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

NOT gate

A

reverses

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

order of operations

A

()

x

+

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

NAND

A

AB’

not and

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

NOR

A

(A + B)’

not or

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

XOR

A

X (plus sign w/ circle around) B

either A/B is on, but NOT both

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

A + 0

A

A

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

A + 1

A

1

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

A + A

A

A

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

A + A’

A

1

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

0A

A

0

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

1A

A

A

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

AA

A

A

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

AA’

A

0

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

A + AB

A

A

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

A + A’B

A

A + B

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

DeMorgan’s Law

A

(A + B)’ = A’B’

(AB)’ = A’ + B’

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

sum of products

A

for every row that = 1, add a term to the expression.

’ if 0. product.

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

product of sums

A

for each line in the truth table that = 0, multiply by another term

’ if 1

sum

only use if one or two 0’s

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

server

A

a computer tht knows how to send messages to other computers

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

packets

A

small pieces of info passed b/w comp’s

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

addresses

A

’s tht uniquely identify a comp on the network

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

protocol

A

rules governing the transfer of info b/w comp’s

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

what r servers connected by?

A

telephone poles & wires on land

cables under sea

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

TCP/IP

A

Transmission Control Protocol

Internet Protocol

rules & instructions on how 2 send info over the internet

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

IP address

A

each device has one

4 #’s, each b/w 0-255 (cuz 4 bytes)

Ex: 128.244.50.1

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

DNS

A

Domain Name System/Service/Server

an Internet serivce tht translates domain names into IP addresses

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

how many possible IP addresses? enough?

A

abt 4 billion. no

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

IPv6

A

6 bytes

abt 281 trillion possibilities

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

man-in-the-middle attack

A

network packets r easily intercepted & changed

rogue server could manipulate communications b/w 2 individuals or just gather info

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

solution to maninmiddle attack

A

trust - only phone companies & qualified individuals allowed to operate major internet servers

cryptography to encode info

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

Dictionary Attack/Brute-Force Attack

A

a comp can try 1000’s of word/letter combos per second to guess ur password

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

bad & good passwords

A

bad = only words

good = 12+ random letters & symbols

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

phishing

A

type of social engineering

when an email and/or website pretends to be someone else & tries to get u to type in ur password & send it to them

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

social engineering

A

security attacks that prey on human psychology

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

malware

A

programs tht do bad things 2 ur comp/device

Ex: erase files, steal info, take pics w/ ur webcam, etc

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

virus

A

most common type of malware

most comp’s come w/ anti-virus software now

because a virus is a program, user must download & run it somehow - might be disguised as game/vid

some take advantage of vulnerabilities in computer systems (Ex: memory stick that automatically runs when u plug it into a comp)

must be created for specific operating systems

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

other types of malware

A

trojans, worms, spyware, rootkits, crimeware, zombie comp, botnet, pharming, Van Eck phreaking

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

input device

A

anything tht lets u interact w/ the PC

Ex: heyboard, mouse, microphone

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

output device

A

anything tht the PC uses to show u what u did

Ex: monitor/display, printer, speakers

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

peripheral

A

anything connected to the comp, but not inside the case

Ex: keyboard, monitor, printer

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

storage devices

A

anything that stores info for the computer

a place to put all those 1s and 0s

capacity measured in megabytes

Ex: hard disk drive, optical disc drive, USB flash drive/memory stick

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

hard disk drive

A

stores info for a comp using a series of magnetic plates

a magnetic arm can read & write the info on the plates, while the plates spin.

don’t put magnet close to one

could die out of box/last a decade

predicting failure = difficult

modern capacity = 250GB-2TB

66
Q

optical disc drive

A

bounces a laser beam off the shiny surface of a disc to read it

the reflective surface actually has microscopic pits & grooves in it to store bits

67
Q

diff b/w CD’s, DVD’s, & Blu-Ray

A

ability to fit more pits & grooves into less space using smaller wavelength lasers

rainow - red light > green light > blue light; each wavelength = size of each hole

68
Q

Random Access Memory (RAM)

A

fast, temporary storage tht the PC uses for what it’s doing @ that moment

comes in “sticks”

capacity of 1 stick = 1-4GB

Ex: opening docs, running programs, mouse pointer location

69
Q

expansion cards

A

add some kind of functionality to a PC

getting rarer, since lots of functions(network, graphics, sound) r built in2 motherboards now

70
Q

on-board

A

built into the motherboard

71
Q

network card

A

allows a PC to go on a network

72
Q

graphics card

A

processes graphical info (usually 3D) for the PC

73
Q

Power Supply Unit (PSU)

A

provides power to the internal components of the computer

diff things might require diff types of connection

PSU’s also have wattages - some things might require more watts than others

74
Q

Central Processing Unit (CPU)

A

the part tht actually performs the instructions & calculations given by the programs

connected to all the other parts of the computer via the bus on the motherboard

75
Q

motherboard (mobo)

A

connects everything together and lets the other parts communicate

lots of diff places for plugging things in: slots, ports, sockets, connectors

76
Q

form factors

A

diff sizes of motherboard

77
Q

bus

A

physical connections (wires) & protocols that allow devices to communicate on the motherboard

78
Q

software

A

the instructions for the omputer

tells the CPU what to calculate

tells the other hardware what to do

79
Q

operating system (OS)

A

the most basic level of software

handles the low-level hardware instructions

  • translating the signals from the mouse into actual cursor movements
  • displaying pixels on screen
  • reading & writing from a hard drive

provides an environment for other software to work

common OS’s = Microsoft Windows, Mac OSX, Linux

software for one OS won’t work on another

80
Q

drivers

A

instructions for the OS to use other devices

special additions to an OS that lets it use new hardware (usually comes w/ CD or something to install the driver)

Ex: an OS might not know how to use a printer until it has the right driver for it

81
Q

program

A

software that a user interacts with, that lets u do something

Ex: Microsoft Word, Mozilla Firefox

82
Q

how OS’s, programs, & drivers all work together

A
83
Q

BIOS

A

Basic Input/Output System

software built into the motherboard that runs when a PC is booting

most important thing it does = decide what storage device to use to finish booting (loading OS) - will typically use hard drive, but can load an OS from ANY storage device

-a CD, DVD, or memory stick

can access by pressing Delete, F1, F2, or F10 while PC is loading (keep tapping)

84
Q

bootstrapping/booting up

A

describes a computer when it is just turned on

85
Q

command line/shell

A

early comp’s didn’t have graphics - if u wanted to do anything u would have to type commands for the comp to do

still used today

someone proficient w/ the command line can navigate the comp & do some complex tasks more efficiently

86
Q

prompt

A

a sequence of characters that the shell uses to inform u that it’s ready for a command

87
Q

path

A

the folder/directory u r in

88
Q

switch/option

A

Ex: /w

changes the behavior of the command

can have 1+ switch

89
Q

read & write

A

the words used to refer to getting data from a storage device & putting data on a storage device

90
Q

Van Eck phreaking

A

the process of eavesdropping on the contents of a CRT or LCD display by detecting its electromagnetic emissions

91
Q

how does software work?

A

u boot the PC & it starts reading instructions from the storage device

the bytes r interpreted as intructions by the PC

the instructions = software –> created thru the process of programming

92
Q

programming

A

giving sequential instructions to a comp. system

done using a programming language

93
Q

programming language

A

turned into instructions for a CPU by a compiler

series of rules that u follow to write English-like text representing abstract instructions

Ex: Java

94
Q

compiler

A

a translator from the programming language instructions to the byte instructions used by the CPU

95
Q

programming constructs

A

many programming languages have similar capabilities

96
Q

Integrated Development Environment (IDE)

A

something like BlueJ tht combines a text editor with a compiler

97
Q

code

A

the text of a program

98
Q

Java’s naming rules

A

starts with a letter

can contain letters, #’s, $, and _

no spaces

case sensitive

99
Q

sample print statement

A

public class CompSci {

public static void main (String [] args)

{

    System.out.println("Hello World!");

}

}

100
Q

whitespace

A

spaces, tabs, etc.

101
Q

values & types

A

Java & all other programming languages have diff types of info

Ex: strings, integers, doubles, and Booleans

102
Q

strings

A

“string”

must have quotation marks

String

103
Q

integers

A

whole #’s w/ no decimal point

weird math

int

104
Q

Booleans

A

only 2 values; true and false

in Java, the words true and false (lowercase) r reserved for Boolean values

boolean

105
Q

operators

A

the symbols tht we use to perform calculations on diff values

106
Q

arithmetic operators

A

+, -, *, /, %

parenthesis used same as in math

107
Q

concatenation/catting

A

if u “add” anything to a string, it will stick the value onto the string

must be adding

Ex: “Hello” + “werld” = “Hellowerld”

50 + “8” = “508”

“Zooba” + 0.5 * 3 = “Zoobah1.5”

108
Q

integer division

A

when 2 integers r divided, the result is always an integer

Java will not round - will simply cut off

Ex: 6/4 = 1

2/3 = 0

if either of the values being divided is a double, then Java will do normal division

Ex: 1/5.0 = 0.2

109
Q

Modulus Division

A

only works on integers

gives remainder of 1st # divided by the 2nd #

Ex: 6 % 4 = 1R2 = 2

12 % 3 = 4R0 = 0

If the 1st # is less than the 2nd #, then the answer is always just the 1st #

Ex: 3%4 = 3

110
Q

integers

A
111
Q

doubles/floating-point values

A

’s w/ decimal points

real #’s

double

112
Q

variables

A

names containers for values

fundamental tool for programming

must be declared

113
Q

variable declarations

A

statements, so must end in semicolons

int blah;

double aVariable;

String porty;

int ting, roo;

114
Q

assignments/statements

A

putting a value into a variable for storage

blah = 10;

aVariable = 0.6;

porty = “Teapot”;

ting = 10/5;

roo = blah / ting; can use other variables in math expressions & assignment statements

115
Q

combining declarations & assignments

A

int abc = 12, def = 801;

double xys = 10.5;

String ijk = “pointy hat”;

116
Q

self assignments

A

can use a variable on the right hand side of its own assignment

int fumu = 10;

fumu = fumu + 3;

fumu = fumu - 5;

117
Q

type mismatch

A

when variables r assigned values tht don’t match their type

int abc = 10.0;

double def = 3; this works tho cuz Java can turn integers into doubles when necessary

118
Q

name conflict

A

w/in a Java program, no 2 variables can be declared w/ the same name, even if they r diff types

int neato;

String neato;

119
Q

import

A

brings in a class from Java’s class library, a large # of classes & methods written by the ppl who made Java, 2 help ppl use Java

120
Q

javax.swing.JOptionPane

A

a collection of useful methods tht can pop up diff windows 2 do stuff

121
Q

showInputDialog

A

a method inside of JOptionPane

pops up a window that lets the user type a string

will then assign the string that was typed to the variable on the left side of the =

only works for Strings

Ex: String zin = JOptionPane.showInputDialog(“Type something!”);

122
Q

Integer.parseInt

Double.parseDouble

A

takes any String in the parenthesis & tries to turn it into an integer/double

123
Q

condition

A

an expression tht compares 2 values & gives a Boolean result (true/false)

5 > 12 (true)

3 > 7 (false)

6 >= 6 (true)

124
Q

conditional operators

A

< less than

> greater than

<= less than/equal to

>= greater than/equal to

== equal to

!= not equal to

don’t work w/ strings

125
Q

.equals()

A

bah.equal(wip) would give true if both bah & wip r the same string

works for strings

126
Q

if

A

if (a

System.out.println("blah");

}

if the condition inside () is true, then Java will do the code inside the curly braces - otherwise, skips it

127
Q

else

A

if (a < b) {

System.out.println("blah");

} else {

a = a + 10;

}

if the condition turns out to be false, the code inside the curly braces after the else keyword will be done

128
Q

else if

A

if (a < b) {

a = a - 5;

} else if (b > c) {

b = b + 0

}

if 1st condition is false but 2nd is true, will do 2nd code

if 1st is true, then will do 1st code & skip else if

129
Q

if-else chains

A

u can put if, lots of else ifs, & an else together in a “chain” of conditions

can have as many else ifs as u want, but only one if @ beginning and one else @ end

Java will work its way down the “chain” & do the code inside the curly braces for the 1st condition which = true

exclusive, so will only actually do the code b/w the 1 set of curly braces

130
Q

branching

A

refers to the ability of the program to do diff things under diff conditions

131
Q

Boolean operators

A

&& and

|| not

! not

used only with conditions

132
Q

boolean order of operations

A

AND always before OR unless parenthesis

math operators ALWAYS take precedence over Boolean operators

(x - 5 < 2) will do x - 5 first

133
Q

loops

A

allow a chunk of code to be repeated over & over, depending on a condition

134
Q

while

A

int x;

x = 0;

while(x < 10) {

System.out.println("Hellow World!");

x++;

}

will repeat everything inside the curly braces of the loop as long as the condition inside the parenthesis is true

135
Q

x++

A

short for x = x + 1

136
Q

incrementing

A

adding 1 to the value stored in the variable

137
Q

increment operator

A

++ in x++

138
Q

for

A

almost identical to while, but syntax diff

public class TheCount

{

public static void main(String [] args);

{

      for(int count = 1; count \<= 100; count++) {

          System.out.println(count + "! A-HA-HA!");

      }

}

}

for(initilization; condition; statement)

139
Q

initialization

A

the initialization section of a “for” loop is done only 1 time before the loop starts

most programmers use this section to declare their counting variable & set u its starting value

140
Q

counting variable/count

A

integer

set to a starting #

141
Q

sentinel loop

A

waits for a condition to be true before stopping but doesn’t involve a looping variable

waiting for user to type something before it exits

142
Q

\n

A

new line

143
Q

cipher

A

(code)

to convert #’s to symbols

144
Q

bitmap

A

a series of bits that represent pixels

145
Q

binary → decimal

A

mutliply each bit by its place value & add

Example: 1001

1*1 + 1*8 = 9

146
Q

binary place values

A

256 128 64 32 16 8 4 2 1

147
Q

Hex Digits

A

0123456789ABCDEF

1 digit = 4 bits

works cuz 16 = power of 2

have h after

256 16 1

148
Q

octal digits

A

use digits 0-7

preceded by oct

512 64 8 1

149
Q

hex → decimal

A

Base 16 place values

Ex: 1B9

1*256 + 11*16 + 1*9 = 441

150
Q

hex → binary

A

memory tip: last 3 #’s for both columns are the same

Ex: F5 1111+010=11110101

151
Q

binary→hex

A

divide into groups of four bits from right to left

Ex: 1011101 = 0101+1101 = 5D

152
Q

decimal→whatev

A

find the highest digit that can “fit” into the decimal #, then subtract from the original #

Division Remainder Method:

take ur #, divide by 2 for binary, 8 for octal, 16 for hex

the remainder of the division is a digit in ur answer

repeat process using the quotient, until the quotient is zero

put the remainders back together backwards for ur answer

153
Q

binary addition

A

similar to addition of large decimal #’s

“carry” when a # gets too large for a single digit

change into decimal, add, change back to binary

for big #’s, put one over the another & add one by one

154
Q

overflow error

A

the answer is more than 1 byte larger

a comp typically will drop the extra bit on the left

sometimes unpredicatble/undefined

155
Q

why overflow happens

A

a comp’s processor stores info in something called a register

if a processor does a calculation & the answer exceeds the capacity of the register, then the extra bits r dropped

156
Q

register

A

have a limited space - can only store a certain # of bits

157
Q

twos complement

A

a binary digit “place value” could be negative

in this class, we’ll assume that 128 is negative (-128)

new range of #’s = -128 to 127

158
Q

unsigned

A

a “normal” binary # (1111 1111 = 255)

159
Q

binary subtraction

A

change second # into twos complement, then add normally

160
Q
A