Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write your programs using C++ In this assignment you must not use your programming language support (nor any libraries) for arbitrary length arithmetic. In your
Write your programs using C++
In this assignment you must not use your programming language support (nor any libraries) for arbitrary length arithmetic.
In your program you must not convert the input binary vectors representing numbers to decimals and use the built-in arithmetic operations on decimals. The operations must be performed on the binary vectors.
include a brief description of the algorithms you implemented, a list of test cases you tried and the results and compilation and execution instructions for your programs.
Problem 1. Design and implement an algorithm that takes two non-negative binary integers x and y represented and returns the quotient and the remainder of the integer division of x by y. Assume that y >0. Represent both the quotient and the remainder as vectors of binary integers. (You can implement the division algorithm from the textbook). Test vour program for the following binarv integers x and v I. x=[0, 1, 1, 0, 0, 0, 1, 1, 1] andy = [1, 1, 1, 1, 0, 1, 1, 0, 1] 2.x=[1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1] andy = [0, 1, 1, 0, 1] 3.x=[1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1] andStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started