MONT 113G

    Home | | Course Schedule | | Assignments | | Lecture Notes

    Review sheet for midterm

    Topics for the Midterm Exam:
    This sheet is intended to help you prepare for the midterm exam in this course. The exam will cover all the lectures, homework and labs from the beginning of the semester through session 13 on Wednesday, 2/22. You should study your class notes, handouts, homeworks and labs. Solutions to the homeworks and labs can be found at the course website: http://mathcs.holycross.edu/~croyden/mont113G. You can also view the slides from session 7 on the history of the internet and TCP/IP that can be found at the website: http://www.wellesley.edu/cs100/Internet.

    The following topics have been covered in the first part of the course. Each of the following topics may appear on the exam. In addition there may be questions on any of the topics from the first part of the course.

    1.  Binary representation
    	Counting in base 2
    	Converting from decimal to base 2 (and back)
    	Hexadecimal representation (base 16)
    	Integer representation
    	     Signed magnitude, One's complement, Two's complement
    	Binary arithmetic	
    	Floating point representation
    
    2.  Digital Circuits
    	Components:
    		Logic switches, AND, OR, NOT, NAND, NOR and XOR
    	Writing Truth tables for circuit outputs
    	Writing logical expressions to describe circuit outputs
    	Designing a circuit to compute a logical expression
    	
    3.  Machine Architecture
    	Computer organization
    		CPU with registers (IP, IR, CF, AX)
    		Memory
    	P88 Assembly language (you do not need to memorize the instructions, but you 
    		should understand how to use the instructions to write a program)
    	Fetch Execute cycle
    	Language Translation
    	
    4.  History of the Internet
    	Origin of the internet--ARPAnet.
    	How the internet evolved
    	Organizations that oversee the internet
    
    5.  TCP/IP
    	Protocols--Purpose, types of protocols (TCP/IP, HTTP)
    	Packet Switching
    	Function of TCP and IP in sending and receiving email
    	How email is transmitted across the network.
    
    6.  The World Wide Web
    	Definition of World Wide Web (difference from Internet)
    	Purpose of Hypertext
    	The Client/Server Model
    	Universal Resource Locators (URLs)
    
    7.  Hypertext Markup Language (HTML)
    	Standard form of an HTML file
    	Common HTML tags (as listed in course notes)
    	Adding Images, Links and Graphics to your page
    		Absolute vs. Relative addressing
    	Coloring the background of your page
    	HTML Tables
    
    8.  Web Graphics
    	Monitor resolution and image size
    	Color representations
    		Bit Depth
    		Color Tables
    		RGB Hexadecimal Color notation
    	Graphic File compression (GIF and JPEG)
    	
    9.  Church-Markov-Turing Hypothesis
    
    10. Tractable and Intractable problems
    	Definition of tractable and intractable problems
    	Examples of Intractable Problems 
    	         (e.g. Traveling Salesman).
    
    11. Noncomputability
    	Non-computable functions
    	The halting problem
    	Other  non-computable problems
    	
    12. Other limits of computing
        Limits to storing integers and real numbers
        Hardware limitations (hardware failure, etc.)
        Limitations in  communication (noise, error checking)
    	  
    


    Practice Problems
    The following problems are intended to help you study for the exam. Solutions to these problems will be posted on the MONT 113G website. You should try to solve the problems before looking at the solutions!

    1) Convert the following numbers to binary representation:

    
    	237
    
    	45
    
    	63
    
    
    2) Convert the above numbers to hexadecimal representation
    
    
    
    
    
    3) For each of the following numbers, show their representations in each of: signed magnitude, 1's complement and 2's complement:
    	22
    
    	-31
    
    	-22
    
    	49
    
    
    
    
    4) Using eight bit numbers, add the following two binary numbers:
    	01110001
    	00011100
    
    Show your work. Convert the result to decimal.
    
    
    
    5) Draw a circuit that computes the following truth table for inputs a and b and output c:

    abc
    000
    011
    101
    110

    6) Write an expression for the output of the following circuit. Draw a truth table that shows the output for each combination of inputs:

    7. Use the web page screen shot given in Figure 1 to answer the following questions. This screen-shot was taken when the mouse was over the link.

    Figure 1. Screen shot of web page for problem 1

      a. What is the filename of the web page?

      b. What is the title of the web page?

      c. Where does the link go?

      d. What is the name of the web server that this page is served from?

      e. Write the HTML file that would generate this page. Hint: Headlines of size 1 and 3 are in this page.

      
      
      
      
      
      
      
      
      
      
      

    8. The following equations give the running times (t) of different algorithms with respect to the size of the input (n). For each, state whether the problem is tractable or intractable:

    9. The following table gives the running time of an algorithm for different input sizes:

    	Size	time(secs)
    	1		0.5
    	2		2.0
    	3		4.5
    	4		8
    	5		12.5
    	...		...
    	10		50
    	100		5000
    

      a) Draw a graph of the running time vs. the input size for sizes of 1 to 5.

      b) Based on the values given, do you think this algorithm is tractable or intractable? Why?

      
      
      
      
      
      

    10. Protocols.

      a) What is the purpose of a protocol?
      
      

      b) List three protocols that we covered in class, and briefly state their functions.

      
      
      
      
      
      

    11. What color does #FF00FF represent in the RGB color representation?

    12. Suppose an image file has a bit depth of 8, a width of 100 pixels and a height of 200 pixels.

      a) How many colors are can be represented in the image?

      b) What is the size of the image if displayed on a monitor with a resolution of 50 ppi (pixels per inch)?

    13. Briefly describe what "packet switching" means and how it is used on the internet.

    
    
    
    
    
    

    14. What is a non-computable function? Describe 2 problems that are non-computable.

    
    
    
    
    
    
    
    
    
    

    15. Suppose you want to prove that a given problem was non-computable with a proof by contradiction. What are the 2 steps you must accomplish for such a proof?

    
    
    
    
    
    

    16. Write an assembly language (P88 instructions) to read in two numbers. If the first is bigger, it should print out the first number. Otherwise the program should print nothing and end.