Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 385 CS 385 Project 1 Fall 2017 Name Part complement binary mamber I. The program must allow casy input of any hase 10 intger

image text in transcribed
CS 385 CS 385 Project 1 Fall 2017 Name Part complement binary mamber I. The program must allow casy input of any hase 10 intger It could prompt the user for ingu. read ipat from a file, or simply accept input as a pernter i.fndion ca. 1'-Klept both positive and negative integer 2. The program must output a string of sisteen 0's or I's cormesponding to the values of the bit n the two's coemplement equivalent of the number inpat. For case of neading, please insert a space every 4 characters: e. g 1011 0010 0101 1110. This output could be a printed display, a result saved to a file, or the retumed output of a function 3. Do not use libeary for other) built in conversion functions i e. you mast program the steps to 4 You may use the programming lanpage ofyour chose, but your prupam perform the coeversion yourself and not merely tap into an existing subroutine thoroughly documented and use a nice modular structure. This is especially important if choose to program in a language other than those with which your intructor is familiar (Basic-not Visual Basac, FORTRAN. Pacal, C++or Mathematica). S. Submit hoth a legible printout of your program and an esecutabile file that can be rm on a PC Include instruactions on running your program It is probably easiest to e-mail this to Part II nswer the follow ing questions 1. If you were designing a computer, would you this type of coeversion as software, hardware, or firmware? Why? 2. Most computer anchitechares represent integers using two's-complement, but they repeese floating pint mmbers using signed-magnitad. Why do you think .sthe caw? CS 385 CS 385 Project 1 Fall 2017 Name Part complement binary mamber I. The program must allow casy input of any hase 10 intger It could prompt the user for ingu. read ipat from a file, or simply accept input as a pernter i.fndion ca. 1'-Klept both positive and negative integer 2. The program must output a string of sisteen 0's or I's cormesponding to the values of the bit n the two's coemplement equivalent of the number inpat. For case of neading, please insert a space every 4 characters: e. g 1011 0010 0101 1110. This output could be a printed display, a result saved to a file, or the retumed output of a function 3. Do not use libeary for other) built in conversion functions i e. you mast program the steps to 4 You may use the programming lanpage ofyour chose, but your prupam perform the coeversion yourself and not merely tap into an existing subroutine thoroughly documented and use a nice modular structure. This is especially important if choose to program in a language other than those with which your intructor is familiar (Basic-not Visual Basac, FORTRAN. Pacal, C++or Mathematica). S. Submit hoth a legible printout of your program and an esecutabile file that can be rm on a PC Include instruactions on running your program It is probably easiest to e-mail this to Part II nswer the follow ing questions 1. If you were designing a computer, would you this type of coeversion as software, hardware, or firmware? Why? 2. Most computer anchitechares represent integers using two's-complement, but they repeese floating pint mmbers using signed-magnitad. Why do you think .sthe caw

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions