Midterms 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
order of operations
() ' x +
26
NAND
AB' not and
27
NOR
(A + B)' not or
28
XOR
X (plus sign w/ circle around) B either A/B is on, but NOT both
29
A + 0
A
30
A + 1
1
31
A + A
A
32
A + A'
1
33
0A
0
34
1A
A
35
AA
A
36
AA'
0
37
A + AB
A
38
A + A'B
A + B
39
DeMorgan's Law
(A + B)' = A'B' (AB)' = A' + B'
40
sum of products
for every row that = 1, add a term to the expression. ' if 0. product.
41
product of sums
for each line in the truth table that = 0, multiply by another term ' if 1 sum only use if one or two 0's
42
server
a computer tht knows how to send messages to other computers
43
packets
small pieces of info passed b/w comp's
44
addresses
#'s tht uniquely identify a comp on the network
45
protocol
rules governing the transfer of info b/w comp's
46
what r servers connected by?
telephone poles & wires on land cables under sea
47
TCP/IP
Transmission Control Protocol Internet Protocol rules & instructions on how 2 send info over the internet
48
IP address
each device has one 4 #'s, each b/w 0-255 (cuz 4 bytes) Ex: 128.244.50.1
49
DNS
Domain Name System/Service/Server an Internet serivce tht translates domain names into IP addresses
50
how many possible IP addresses? enough?
abt 4 billion. no
51
IPv6
6 bytes abt 281 trillion possibilities
52
man-in-the-middle attack
network packets r easily intercepted & changed rogue server could manipulate communications b/w 2 individuals or just gather info
53
solution to maninmiddle attack
trust - only phone companies & qualified individuals allowed to operate major internet servers cryptography to encode info
54
Dictionary Attack/Brute-Force Attack
a comp can try 1000's of word/letter combos per second to guess ur password
55
bad & good passwords
bad = only words good = 12+ random letters & symbols
56
phishing
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
57
social engineering
security attacks that prey on human psychology
58
malware
programs tht do bad things 2 ur comp/device Ex: erase files, steal info, take pics w/ ur webcam, etc
59
virus
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
60
other types of malware
trojans, worms, spyware, rootkits, crimeware, zombie comp, botnet, pharming, Van Eck phreaking
61
input device
anything tht lets u interact w/ the PC Ex: heyboard, mouse, microphone
62
output device
anything tht the PC uses to show u what u did Ex: monitor/display, printer, speakers
63
peripheral
anything connected to the comp, but not inside the case Ex: keyboard, monitor, printer
64
storage devices
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
65
hard disk drive
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
optical disc drive
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
diff b/w CD's, DVD's, & Blu-Ray
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
Random Access Memory (RAM)
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
expansion cards
add some kind of functionality to a PC getting rarer, since lots of functions(network, graphics, sound) r built in2 motherboards now
70
on-board
built into the motherboard
71
network card
allows a PC to go on a network
72
graphics card
processes graphical info (usually 3D) for the PC
73
Power Supply Unit (PSU)
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
Central Processing Unit (CPU)
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
motherboard (mobo)
connects everything together and lets the other parts communicate lots of diff places for plugging things in: slots, ports, sockets, connectors
76
form factors
diff sizes of motherboard
77
bus
physical connections (wires) & protocols that allow devices to communicate on the motherboard
78
software
the instructions for the omputer tells the CPU what to calculate tells the other hardware what to do
79
operating system (OS)
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
drivers
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
program
software that a user interacts with, that lets u do something Ex: Microsoft Word, Mozilla Firefox
82
how OS's, programs, & drivers all work together
83
BIOS
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
bootstrapping/booting up
describes a computer when it is just turned on
85
command line/shell
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
prompt
a sequence of characters that the shell uses to inform u that it's ready for a command
87
path
the folder/directory u r in
88
switch/option
Ex: /w changes the behavior of the command can have 1+ switch
89
read & write
the words used to refer to getting data from a storage device & putting data on a storage device
90
Van Eck phreaking
the process of eavesdropping on the contents of a CRT or LCD display by detecting its electromagnetic emissions
91
how does software work?
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
programming
giving sequential instructions to a comp. system done using a programming language
93
programming language
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
compiler
a translator from the programming language instructions to the byte instructions used by the CPU
95
programming constructs
many programming languages have similar **capabilities**
96
Integrated Development Environment (IDE)
something like BlueJ tht combines a text editor with a compiler
97
code
the text of a program
98
Java's naming rules
starts with a letter can contain letters, #'s, $, and \_ no spaces case sensitive
99
sample print statement
public class CompSci { public static void main (String [] args) { System.out.println("Hello World!"); } }
100
whitespace
spaces, tabs, etc.
101
values & types
Java & all other programming languages have diff types of info Ex: strings, integers, doubles, and Booleans
102
strings
"string" must have quotation marks String
103
integers
whole #'s w/ no decimal point weird math int
104
Booleans
only 2 values; true and false in Java, the words true and false (lowercase) r reserved for Boolean values boolean
105
operators
the symbols tht we use to perform calculations on diff values
106
arithmetic operators
+, -, \*, /, % parenthesis used same as in math
107
concatenation/catting
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
integer division
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
Modulus Division
**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
integers
111
doubles/floating-point values
real #'s #'s w/ decimal points double
112
variables
names containers for values fundamental tool for programming must be declared
113
variable declarations
statements, so must end in semicolons int blah; double aVariable; String porty; int ting, roo;
114
assignments/statements
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
combining declarations & assignments
int abc = 12, def = 801; double xys = 10.5; String ijk = "pointy hat";
116
self assignments
can use a variable on the right hand side of its own assignment int fumu = 10; fumu = fumu + 3; fumu = fumu - 5;
117
type mismatch
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
name conflict
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
import
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
javax.swing.JOptionPane
a collection of useful methods tht can pop up diff windows 2 do stuff
121
showInputDialog
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
Integer.parseInt Double.parseDouble
takes any String in the parenthesis & tries to turn it into an integer/double
123
condition
an expression tht compares 2 values & gives a Boolean result (true/false) 5 \> 12 (true) 3 \> 7 (false) 6 \>= 6 (true)
124
conditional operators
\< less than \> greater than \<= less than/equal to \>= greater than/equal to == equal to != not equal to **don't work w/ strings**
125
.equals()
bah.equal(wip) would give true if both bah & wip r the same string works for strings
126
if
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
else
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
else if
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
if-else chains
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
branching
refers to the ability of the program to do diff things under diff conditions
131
Boolean operators
&& and || not ! not used only with conditions
132
boolean order of operations
AND always before OR unless parenthesis math operators ALWAYS take precedence over Boolean operators (x - 5 \< 2) will do x - 5 first
133
loops
allow a chunk of code to be repeated over & over, depending on a condition
134
while
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
x++
short for x = x + 1
136
incrementing
adding 1 to the value stored in the variable
137
increment operator
++ in x++
138
for
almost identical to while, but syntax diff ## Footnote 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
initialization
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
counting variable/count
integer set to a starting #
141
sentinel loop
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
\n
new line
143
cipher
(code) to convert #'s to symbols
144
bitmap
a series of bits that represent pixels
145
binary → decimal
mutliply each bit by its place value & add Example: 1001 1\*1 + 1\*8 = 9
146
binary place values
256 128 64 32 16 8 4 2 1
147
Hex Digits
0123456789ABCDEF 1 digit = 4 bits works cuz 16 = power of 2 have h after 256 16 1
148
octal digits
use digits 0-7 preceded by oct 512 64 8 1
149
hex → decimal
Base 16 place values Ex: 1B9 1\*256 + 11\*16 + 1\*9 = 441
150
hex → binary
memory tip: last 3 #'s for both columns are the same Ex: F5 1111+010=11110101
151
binary→hex
divide into groups of four bits from right to left Ex: 1011101 = 0101+1101 = 5D
152
decimal→whatev
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
binary addition
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
overflow error
the answer is more than 1 byte larger a comp typically will drop the extra bit on the left sometimes unpredicatble/undefined
155
why overflow happens
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
register
have a limited space - can only store a certain # of bits
157
twos complement
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
unsigned
a "normal" binary # (1111 1111 = 255)
159
binary subtraction
change second # into twos complement, then add normally
160