1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
maks197457 [2]
3 years ago
4

Write a user defined Matlab function that converts integers written in decimal form to binary form. Name the function b = Bina(d

), where the input argument d is the integer to be converted and the output argument b is a vector with ones and zeros that represents the number in binary form. The largest number that could be converted with the function should be a binary number which 16 ones. If a large number is entered as d, the function should display an error message. Use the function to convert the following numbers: (a) 100 (b) 1002 (c) 52601 (d) 200,090
Computers and Technology
1 answer:
svet-max [94.6K]3 years ago
8 0

Answer:

function [b] = bina(d)

% bina is a function that converts integers to binary

%

   b = [];

  if d >=(2^16 -1)

  fprintf('This number is too big')

  else

      while d ~= 0

          r=rem(d,2);

          b=[r b];

          d = idivide(d,2);

      end

  end

end

You might be interested in
Which model states that the people and the environment for communication are constantly changing? A. linear B. interactive C. tr
In-s [12.5K]

The interactive model of communication states that the people and the environment for communication are constantly changing.

B. interactive

<u>Explanation:</u>

The world is a big place and you must have come across the infamous hearing, "Change is the only constant". Gradually, with the passage of time, the mindset of the people change over a certain topic for communication.

For instance, in old times, people did not prefer their children to have love marriages, in fact India has also seen honor killings to prevent love marriages. But now most portion of the society stands in favor of love marriages. People change, perspective change, and so does the perception and ideas.

6 0
3 years ago
Friction is the
grin007 [14]
D. resistance of movement between two surfaces in contact.
The more friction an object has, the slower it will move. Heavier objects have more friction. For example, a heavier car will have more friction than a car with less weight, therefore the lighter car will travel faster.
5 0
3 years ago
Show the printout of the following code. public class Test { public static void main(String[] args) { double[][] m = {{1, 2, 3},
gtnhenbr [62]

Answer:

The answer to the given question is "3.6".

Explanation:

The printout description of the given java program can be given as:

In this program, the printout of the following code is 3.6. because in this program we define an array and assign elements on the array and calculate the sum of the elements but in the loop, we calculate the sum of rows value that is i [1][1]= 1.0, i [2][2]=2.5 and i [3][3]=0.1  then we calculate sum that is equal to 3.6.

That's why the answer to this question is "3.6".  

7 0
4 years ago
How many schools are there total at Gaineseville tx
Ahat [919]
There are ten schools total

7 0
3 years ago
Read 2 more answers
Which component in a laser printer applies toner to the drum?
Snowcat [4.5K]

the Developing roller applies the toner

6 0
3 years ago
Other questions:
  • Which are types of lines? Choose three answers.
    9·1 answer
  • An intranet is a way for a company or organization to protect copyrighted and other important information?
    15·2 answers
  • What is an image that you can apply to another image to add detail and texture?
    6·1 answer
  • Each warning label must contain this element and its purpose is to provide a visual alert to users to the chemical hazards to wh
    14·2 answers
  • What is the difference between requirements and controls in the security process? Give examples of each.
    11·1 answer
  • The Department of Homeland Security only deals with threats to national security and does not play a role in helping companies m
    13·1 answer
  • Write a MASM program to calculate Fibonacci numbers:
    10·1 answer
  • Can someone please help me on these short short questions marking Brainly computer modeling people please help
    14·1 answer
  • Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
    6·1 answer
  • Ken is a mobile app developer. He is designing a mobile app that offers tips and guidance to people interested in learning jazz
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!