Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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] and

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions