Friday, October 21, 2016

Unit 2 Lesson 1 Bytes and File Sizes





Activity Guide - Bytes and File Sizes
logo.png

Byte: unit of data that is 8 bits

Unit
Number of Bytes (approx)
Example of File Type or Data Measured in this Unit
Kilobyte (KB)
1,000
1 typed letter is 1KB
Megabyte (MB)
1,000,000
MP3, 1 high quality picture, or 4 books
Gigabyte (GB)
1,000,000,000
An hour of video
Terabyte (TB)
1,000,000,000,000
300 hours of quality film
Petabyte (PB)
1,000,000,000,000,000
5 years of EOS data
Exabyte (EB)
1,000,000,000,000,000,000
All words ever spoken by human beings = 15 exabytes


File type
Size as # of pages, minutes, seconds, or dimensions
Size of file in Bytes, KB, MB, GB, etc.
page of plain text (.txt)
About 500 words, or 2500 characters
2500 Bytes, 2.5KB
.jpg image
386 x 345
41,400 bytes,41.4 KB
animated .gif image
14 seconds
300,000,000 bytes,300,000 KB,300 MB
.pdf file
2 pages
126,000 bytes, 126 KB
Audio file as .mp3
1 minute, 96 kbps
,720,000 bytes, 720 KB
movie file such as .mov or .mp4
1 hour, 1280 x 720 resolution
,700,000,000 KB, 700,000 GB,700 MB



  1. Alice has 600 MB of data. Bob has 2000 MB of data. Will it all fit on Alice's 4 GB thumb drive?


Yes, because 4gb is equal to 4000 megabytes  and there is only 2,600 MB of data.

  1. Alice has 100 small images, each of which is 500 KB. How much space do they take up overall in MB?
Alice has 50,000 KB in total. There are 1000 KB in 1 Megabyte so this data will take up 50 MB of data.


  1. Your ghost hunting group is recording the sound inside a haunted classroom for 20 hours as MP3 audio files. About how much data will that be, expressed in GB?
There is 1 MB of data per minute of MP3 audio. 1,200 MB for 20 hours of MP3 audio. 1,200 MB is 1.2 GB.


  1. A salesperson is trying to sell you a phone that has 16 GB of memory saying, “that’s enough space to record an hour of high quality video!”  This salesperson is probably wrong, but in which direction?  Would you have more than enough memory or not enough?
The salesperson isn’t specifying the resolution of the video. 1 hour of 720P video can range from around 900 MB to 4 GB based  on the compression. 1 hour of 1080p video can range from 1.2  GB to  8 GB based on the compression settings. In any case, we have more than enough memory for 1 hour of video.



  1. Shakespeare’s complete works have approximately 3.5 million characters.  Which is bigger in file size: Shakespeare’s complete works stored in plain ASCII text or a 4 minute song on mp3?  How much bigger?


Shakespeare's complete works take up 3.5 million bytes. A minute of mp3 at a normal bitrate is around 720 KB. 4 minutes of mp3 would be equivalent to 2,880 kilobytes. 1 kilobyte is equal to 1000 bytes so 4 minutes of mp3 is equal to 2,880,000 bytes. Shakespeare's complete works take up 620,000 more bytes than 4 minutes of mp3 music.




  1. Tricky: Assume your Internet connection can transmit 1 million bits per second.  Approximately how long would it take you to download 1 Terabyte of data?  (Hint: first figure out how many bits a terabyte is, second be prepared to wait a long time).  


There are 8 bits in a byte and 1,000,000,000,000(1 trillion) bytes in a terabyte. This means that there are 8 trillion bits in one terabyte. If my internet connection could transmit  1 million  bits per second, it would still take 8 million seconds to download  1 terabyte.





It is important to know how big the files you use everyday really are and how much physical space they take up on your hard drive. The longer the file is in length and the higher the quality of the file, the more space it will take up. A high quality audio, video, or picture is always bigger than a plain text file. Large, high quality files generally take a long time to download or send. It is amazing how much data storage and computing power has evolved, It is a miracle that computers are able to download and store massive amounts of files. It is also amazing to remember that the files we use everyday are made up of large chunks of 0s and 1s.


Additional Resources:
https://www.youtube.com/watch?v=HApGAnRGTks

https://www.youtube.com/watch?v=ICJqv0TN6-c

https://www.youtube.com/watch?v=fiFIosVbp9w





IP and DNS Explained

AP Computer Science Principles
IP Questions
  1. What is a protocol?


A protocol is a well known set of rules and standards used to communicate between machines. All parties have to agree to these rules. For example, bit size must be agreed upon before sending information.  


  1. What is an Internet Protocol (IP) address? How is it organized hierarchically?
An IP address is the protocol computers use to send information to each other in a network. Each computer is assigned a number that it can use to communicate. It is a string of numbers separated by periods. It is a 32 bit number containing the country/network, the region/network, subnetwork, and device.

  1. How many bits are in an IPv4 address?  How many IPv4 addresses does that mean there are?  


An IPv4 address has 32 bits. This means that there are over 4 billion addresses.







  1. What is the difference between IPv6 and IPv4.  Why do we need IPv6?
An IPv6 address uses 128 bits of information instead of 32 bits in IPv4. We need IPv6 because 4 billion devices are not enough to connect everyone to the internet. IPv6 provides over 340 undecillion unique addresses.


  1. What is an IP packet?
An IP packet are small chunks of data sent when a computer sends a request to access a link. They are stamped with the IP address so the DNS server knows where to send the information. Small bits of data work better because the bandwidth can be shared more easily. In a cyber attack, a hacker may send a fake domain in response to the request. They are reassembled by the transmission control protocol when they reach the correct destination.




  1. What is the difference between an IP address and an IP Packet?


An IP address is the address where the answer to the request made by the IP packet is to be sent. IP packets are only chunks of data that make up a request.


  1. What is the purpose of the Domain Name System (DNS)?
The domain name system is the system that associates a domain name(eg: www.code.org) to an IP address. The computer sends a request DNS to search domain names and get the ip address so it can connect to the webpage. DNS servers are divided by zones so they can handle all the requests of computer traffic. Companies like google and your isp have dns servers.


  1. What is the IP address of the computer you’re sitting at right now?
The IPv4 address of my computer is 66.214.82.30.

The internet works by using the IP protocol and the domain name system. To connect to a webpage or send an email, your computer sends a request to a domain name server to retrieve the IP address of a certain url. The computer then sends a request to the HTTP server to retrieve the webpage you are trying to access. All these requests are sent in the form of IP packets that are marked/ordered and reassembled by the transmission control protocol to ensure reliable transmission. All these protocols need to work perfectly for the Internet to function properly and not break down. It is able to accomplish this so reliably because IP packets are routed through a system of decentralized routers.

Further Resources:

https://www.youtube.com/watch?v=L6bDA5FK6gs


https://www.youtube.com/watch?v=7_LPdttKXPc



Monday, October 10, 2016

On Net Neutrality and the Rise of the Deep Web Research Project

A neutral network is one that has no content filtering, surveillance, or censorship and encourages transparency, free speech, and data equality. Our internet is not like this today. Citizens do not feel like their data is private from the government and their Internet Service Providers. Content on the internet is being blocked, filtered, and censored by ISPs. A popular way of censoring and filtering content is deep packet inspection, which inspects the packet of data at a certain point in it's route and decides whether or not it can continue through the protocol depending on how much the content complies to the specific policies of the provider. For example, Comcast allegedly prevented its users from accessing BitTorrent, a popular torrent file sharing transfer protocol in this way. Access to the internet has not been open to all and data has not been treated equally because ISP's are providing faster network speeds to companies and throttling bandwidth network speeds for the general public. The Federal Communications Commission has proposed several policies since 2010 but has had trouble actually policing the internet to ensure openness. In the face of these problems, citizens have resorted to using the “Deep Web” and the “Darknet.” The Dark Web consists of sites that cannot be indexed by a search engine and makes up most of the web. The deep web consists of around 96% of world wide web content and only around 4% of WWW content can be accessed through a surface engine. The darknet consists of either a file sharing or privacy network that can only be accessed through specific software. One popular way to access the darknet is to use free software called Tor to establish an anonymity network. Tor routes traffic through a worldwide network of more than seven thousand random relays to conceal user location and usage data. It also encrypts the destination IP addresses many times to make the user very difficult to find. Each layer decrypts and peels back a layer of encryption until the packet of data reaches the final relay, fully decrypted. The final relay sends the IP packet to the destination without even knowing it's IP address. All this encryption makes Tor much slower to use but citizens are willing to sacrifice latency for privacy. Darknets allow the user to be private and access all content with no filtering or government surveillance. Although complete government detachment and neutrality allows citizens to feel free, it has made room for several illegal activities such as child pornography, malware distribution, human trafficking, and large drug markets. Guns and drugs are sold through bitcoin to ensure secure, anonymous transactions. I believe that it is very important for every user to be aware of the advantages of Darknets and Tor. However, I also believe that Tor must be cleaned of all the illegal activities that make it impossible for the network to achieve the free communication it strives for. Support from major tech companies like Google could greatly improve Tor by making it safer and easier to use for the general public.


Sources and Further Reading:
https://en.wikipedia.org/wiki/Tor_(anonymity_network)

https://en.wikipedia.org/wiki/Deep_packet_inspection

https://en.wikipedia.org/wiki/Darknet

https://en.wikipedia.org/wiki/Net_neutrality

https://www.deepdotweb.com/2014/06/21/how-the-deepweb-helped-and-hindered-net-neutrality-and-online-privacy

 http://www.pcworld.com/article/2046227/meet-darknet-the-hidden-anonymous-underbelly-of-the-searchable-web.html

https://www.youtube.com/watch?v=nKrODPtVinw