Question: A positive integer x expressed in decimal ( base 1 0 ) can be expressed using binary ( base 2 ) by repeatedly dividing x
A positive integer expressed in decimal base can be expressed using binary base by repeatedly dividing by and determining the remainder. The binary value is then constructed using the remainders written in reverse order. For example, to express as a binary number
remainder
remainder
remainder
remainder
remainder
So expressed as a binary number is
Write a function called binary that takes in the input argument of a positive integer and returns a string of the value of expressed as a binary number using MATLAB.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
