Midterm Review Flashcards
A programming language uses 4-bit binary sequences to represent nonnegative integers. A programmer attempts to add the decimal values 14 and 15. What will happen?
An overflow error will occur, because the largest binary value that can be represented using 4 bits is 1111, which equals 15.
Lossless vs. Lossy compression
Lossless - does not lose any data in the compression process
Lossy - uses approximations and partial data, so the file is not restored to its original form after decompression
What is an advantage of lossless compression over lossy compression
Lossless compression can guarantee reconstruction of the original data, while lossy compression cannot
There are hundreds of digital photos with data representing the level of red, green, and blue for each pixel, as well as metadata that describes the date, time, and location the photo was taken.
For which goals would analyzing the metadata be more appropriate than analyzing the data?
A) Determining the chronological order of the photos
B) Determining the number of clouds in a photo
C) Determining whether a photo is suitable for printing in black-and-white
D) Determining whether two photos were taken at the same location
A and D
Because date and time, as well as location, are considered metadata
Metadata
Data that describes data
In ASCII:
What number corresponds with A and Z
A: 65
Z: 90
What letter is represented by 1001010
H (74)
What letter is represented by 1001001
I (73)
What letter is represented by 1001000
H (72)
What letter is represented by 1001011
K (75)
Redundancy
A system design with multiple paths for traffic, so that data can keep flowing even if one path fails
If you upgrade from 32-bits to 64-bits, how many more items can be stored?
232 times more
Overflow error
Happens when a program receives a value that exceeds the storage capacity, usually in binary
Round-off error
The difference between an approximation of a number (9.5) and the exact number (9.51235932)
Floating-point representation
Allow computers to represent very large or very small numbers using scientific notation. There can be a loss of precision due to the infinite number of real numbers compared to the finite number of bits used to represent them.
What is the next binary number after: 1001 0011
1001 0100
Parameter
Input to a function that is named
Boolean
Can have two values, true or false
Undecidable problem
A problem that it is impossible to construct an algorithm for that always leads to a correct yes-or-no answer
Explain what this will do:
PROCEDURE printNums(max)
{
count ← 1
REPEAT UNTIL(count > max)
{
DISPLAY(count)
count ← count + 2
}
}
Starts the count at one, and inside the loop, the value of count is displayed, and then it will increase by two. The loop stops when count exceeds max, so all positive integers less than or equal to max will be displayed
Return
Will immediately end the function and send back whatever information it is meant to return
Generalization
Identifies commonalties among a set of entities
String
A sequence of characters
Example: “Hello”
List
Data type that represents a number of ordered values, usually strings or numbers
Example:
doglist = [“poodle”, “pug”, “pitbull”]
AND (Boolean logic)
Will only return the results that contain both the keywords
OR (Boolean logic)
Will return results if either keyword (or both) is included
NOT (Boolean logic)
Will return results only if the keyword is not included
Web server vs. Web browser
Web browser is the software that is used for browsing on the internet, and a web server is the software the provides the users documents upon their request
Standard protocols
Set of rules used by computers to allow them to interact between themselves
Proprietary Communication
A communication protocol owned by a single organization or individual
Open protocol
The ones on the internet, they are not owned by any particular company and allow any computing device to join the global network
Encryption protocols
Encryption done through encryption algorithms
How must digital data be sent?
By breaking down data into blocks of bits called packets
Relationship between the internet and World Wide Web
The internet is a network of connected devices, and the World Wide Web is a system of linked pages that is accessed via the internet
IPv6 vs IPv4
IPv6 allows for more addresses, which allows for more devices to be connected to the Internet
How is fault tolerance achieved
By providing multiple paths between devices
How are IP addresses assigned?
As a new device is connected to the Internet, it is assigned an IP address to enable communication on the network
Digital Divide
Divide between with access to the internet and those without
Crowdsourcing
The practice of using input or information obtained from a large number of people via the Internet
How to reduce bias
Test the system with people of different ages, genders, and ethnicities
Multifactor authentication
A method in which a user is only granted access after presenting several separate pieces of evidence to an authentication mechanism
Cloud Computing
A form of computing in which networks, data storage applications, security, and development tools are all enabled via the Internet.