Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.) Decimal Binary and Octal : Write a series of functions that convert a decimal number into binary and octal. 2.) Binary and Octal Decimal:

1.) Decimal Binary and Octal : Write a series of functions that convert a decimal number into binary and octal.

2.) Binary and Octal Decimal: Write a series of functions that convert a binary or octal number back into decimal. For Problems 1 and 2, check your functions with the following: 10Decimal = 1010Binary = 12Octal 20Decimal = 10100Binary = 24Octal

3.) Binary Addition: Write a function that adds two binary numbers that are entered by the user. You may represent each binary number as a string of 0s and 1s. Remember that the calculations need to start at the end of the strings. For binary numbers of different length, you may pad the shorter number with 0s in the front. Also, make sure that the carry bit is implemented properly. For example, the solution of 1 + 1 = 10.

image text in transcribed

Problems In this lab, we will use Matlab (or C++) to implement a variety of problems. Note for all problems listed, the use of built-in functions or libraries is allowed and should be well commented. 1. Decimal Binary and Octal (30 points Write a series of functions that convert a decimal number into binary and octal 2. Binary and Octal Decimal (30 points) Write a series of functions that convert a binary or octal number back into decimal. For Problems 1 and 2, check your functions with the following: 10 Decimal 1010 Binary 12 Octal 20 Decimal 10100 Binary 24 Octal 3. Binary Addition (40 points) Write a function that adds two binary numbers that are entered by the user. You may represent each binary number as a string of 0's and 1's. Remember that the calculations need to start at the end of the strings. For binary numbers of different length, you may pad the shorter number with 0's in the front. Also, make sure that the carry bit is implemented properly. For example, the solution of 1 1 10

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions