CSCI 112 Spring 2024
Exploring Computer Science
Archived Class
Charles Cusack
Computer Science
Hope College
Main
Schedule
Grading
Gradebook
Homework

Policies
Advice
College
    Policies

Notes
Programs
Tutorials

CSCI 125
CSCI 255
Others

Admin

Homework 5

Details

For each problem make sure you clearly and neatly show all of your work! Each part/problem is worth 5 points.

  1. (5) Use BinaryViewer to change the color of the green canoe in Canoes.bmp to a purplish color (or another color of your choice). Try to maintain the same look (so pick colors with similar darkness, and keep it so that there are several colors from lighter to darker).
    Hint: You should only have to change a handful (6-8?) of the entries in the color table, not individual pixels!
    Submit your modified Canoes.bmp file at Moodle HW 5 Canoes.bmp handin. On your paper, clearly explain how you edited the photo, including the index of the entries of the color table that you modified.
  2. (10) Consider the following multiplication of unsigned integers.
          1001010101
        x 1111000101
       -------------
    
    1. Convert the numbers to decimal and perform the computation.
    2. Compute the product using either the straightforward binary multiplication algorithm or the partial-sum approach. In either case, show all of your work!.
    3. Convert your answer from (b) to decimal and verify that it matches your answer in (a).
  3. (10) Consider the following multiplication of two's complement integers.
          1001010101
        x 1111000101
       -------------
    
    1. Convert the numbers to decimal and perform the computation.
    2. Compute the product using Booth's Algorithm. Show all of your work!.
    3. Convert your answer from (b) to decimal and verify that it matches your answer in (a).