Binary Conversions and Arithmetic Lab Notes for CS10051, Lab Reports of Computer Science

The lab notes for a computer science course focusing on binary conversions and arithmetic. Students are required to convert binary integers to decimal and vice versa, as well as perform binary addition, subtraction, and multiplication. The lab also covers floating point binary and includes questions for conversion and error measurement.

Typology: Lab Reports

Pre 2010

Uploaded on 08/01/2009

koofers-user-gtu
koofers-user-gtu 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lab 9 – Binary Conversions and Arithmetic
Dean Zeller Due: Wednesday, April 12th by 9:00 PM
CS10051 Lab: 10 points
Spring, 2006 Assignment: 10 points
Objective The student will convert binary integers to decimal, decimal to binary, and perform
binary arithmetic (addition, subtraction, and multiplication).
Materials: Binary Calculator
You will need a calculator with binary number functionality. The Microsoft Windows calculator is
sufficient for this assignment. The purpose of the calculator is to check your work on the assignments.
It is still important for you to know the method behind the calculation, as calculators will not be allowed
on the exam.
Background: Binary Numbers
The binary number system is used by computers to do every calculation and decision within a
computer’s Central Processing Unit (CPU), and is also the system used for long and short term storage.
It is helpful as computer scientists to know this number system very well. In the next few weeks, you
will learn how circuits are designed to make calculations in this system.
Lab Notes (5 points)
Given below are five questions dealing with binary conversions and arithmetic. Solve the problems
using the diagram method shown in class. Word processing is not necessary, but you are being graded
on neatness.
Lab Report (5 points)
For each question below, choose one problem to demonstrate using a word processor and/or graphics
package. Diagram your answer as shown in class.
Assignment 9 – Floating Point Binary
Objective The student will perform binary division, convert decimal fractions to floating point
binary, convert floating point binary to decimal, and measure the error of 8-bit precision
binary numbers.
Background: Floating Point Binary
This system of numbers is typically left out of computer architecture textbooks. Conceptually, floating
point binary is no more difficult than decimal, just with a different “behavior.”
Assignment Notes (5 points)
Given below are five questions dealing with floating point binary. Solve the problems using the
diagram method shown in class. Word processing is not necessary, but you are being graded on
neatness.
Assignment Report (5 points)
For each question below, choose one problem to demonstrate using a word processor. Diagram your
answer as shown in class.
Grading:
You will be graded on the following criteria:
Accuracy Correctly diagramming the solutions.
Organization Neatness and readability of the answers and diagrams
Extra Credit:
Extra credit will be given for any of the following:
Create and solve your own problems.
Use a word processor on all problems.
pf2

Partial preview of the text

Download Binary Conversions and Arithmetic Lab Notes for CS10051 and more Lab Reports Computer Science in PDF only on Docsity!

Lab 9 – Binary Conversions and Arithmetic

Dean Zeller Due: Wednesday, April 12th^ by 9:00 PM CS10051 Lab: 10 points Spring, 2006 Assignment: 10 points Objective The student will convert binary integers to decimal, decimal to binary, and perform binary arithmetic (addition, subtraction, and multiplication). Materials: Binary Calculator You will need a calculator with binary number functionality. The Microsoft Windows calculator is sufficient for this assignment. The purpose of the calculator is to check your work on the assignments. It is still important for you to know the method behind the calculation, as calculators will not be allowed on the exam. Background: Binary Numbers The binary number system is used by computers to do every calculation and decision within a computer’s Central Processing Unit (CPU), and is also the system used for long and short term storage. It is helpful as computer scientists to know this number system very well. In the next few weeks, you will learn how circuits are designed to make calculations in this system. Lab Notes (5 points) Given below are five questions dealing with binary conversions and arithmetic. Solve the problems using the diagram method shown in class. Word processing is not necessary, but you are being graded on neatness. Lab Report (5 points) For each question below, choose one problem to demonstrate using a word processor and/or graphics package. Diagram your answer as shown in class.

Assignment 9 – Floating Point Binary

Objective The student will perform binary division, convert decimal fractions to floating point binary, convert floating point binary to decimal, and measure the error of 8-bit precision binary numbers. Background: Floating Point Binary This system of numbers is typically left out of computer architecture textbooks. Conceptually, floating point binary is no more difficult than decimal, just with a different “behavior.” Assignment Notes (5 points) Given below are five questions dealing with floating point binary. Solve the problems using the diagram method shown in class. Word processing is not necessary, but you are being graded on neatness. Assignment Report (5 points) For each question below, choose one problem to demonstrate using a word processor. Diagram your answer as shown in class. Grading: You will be graded on the following criteria: Accuracy Correctly diagramming the solutions. Organization Neatness and readability of the answers and diagrams Extra Credit: Extra credit will be given for any of the following:  Create and solve your own problems.  Use a word processor on all problems.

Lab 9 Questions

QUESTION 1 Convert the following binary numbers to decimal. 0001 1001 1111 1101 0010 1001 1000 1101 0101 0011 1010 1110 1110 1110 QUESTION 2 Convert the following decimal numbers to binary. 29 250 1000 78 315 2049 QUESTION 3 Perform the following binary addition. Check your work for correctness, and make note of any addition overflow. (Diagramming not necessary for checking work.) 1010 1100

  • 100 1010

QUESTION 4 Perform the following binary subtraction. Check your work for correctness. (Diagramming not necessary for checking work.) 1011 1011

  • 100 1001

QUESTION 5 Perform the following binary multiplication. Check your work for correctness. (Diagramming not necessary for checking work.) 0000 1101  111

Assignment 9 Questions

QUESTION 1 Perform the following binary integer division problems. Give a remainder for problems that do not divide evenly. 110 110110 101 10101001 111 10011011 110110110 110 110110 10 110110000 100 110110000 1000110110000 10000110110000 QUESTION 2 Convert the following fractions into binary. Continue until the binary number terminates or repeats. All numbers will terminate or repeat within 10 bits, most are 3 to 5 bits. (^1) / 5 1 / 7 1 / 10 1 / 20 3 / 8 1 / 14 1 / 13 3 / 16 3 / 32 3 / 64 (^3) / 16 3 / 32 61 / 64 5 / 16 6 / 19 .2 .3 .7125 .796875. QUESTION 3 Convert the following 8-bit precision floating point binary numbers into decimal. 0.0110 1000 2 0.1000 0100 2 0.1111 1111 2 0.0000 0011 2 0.0000 0001 2 0.1010 1010 2 0.1000 0100 2 0.0101 0100 2 QUESTION 4 Convert .0525 and .995 into floating point binary. Continue until the binary number terminates or repeats. (Hint: you will probably need a whole page to do this problem.) QUESTION 5 Give the 8-bit precision floating point binary representation for the following decimal numbers. Convert your answer back into decimal and indicate the difference between the two decimal values. .53 .42 .10 .75 .73 .25 .99 .01 .51.