Write matlab programs to convert the following to binarynumbers.
a) 23
b)87
c) 378
d)2388

Answers

Answer 1

Answer:

decimal_no = 23;

binary_no = dec2bin(decimal_no);

matlab answer=10111  /*it is a string in matlab*/

now you just have to change the values of decimal_no

On putting 87

the answer is 1010111

On putting 378

the answer is 101111010.

On putting 2388

the answer is 100101010100.

Explanation:

We have used the inbuilt function in matlab dec2bin(decimal Number) it returns the binary number as a string.


Related Questions

In fiberoptic cable, the signal source is__________waves

1 Infrared

2 Light

3 Radio

4 Very LowFrequency

Answers

Answer: Option - 2) Light

In fiber optic cable, the signal source is light wave.

Explanation: In fiber optic cable the data transmission send information through electronic signal into light wave. When the input data is given in the form of electronic signal, then it gets converted into light signal with the help of light source. As fiber optic is a medium for carrying information in the form of light from one medium to another. Fiber optics are beneficial as it is used in long distance data transmission.

T F All static local variables are initialized to −1 by default.

Answers

Answer:

F

Explanation:

they are initialized to 0 by default.static variables are shared variables

Something within a while loop must eventually cause the condition to become false, or a(n) __________ results.



1. null value

2. infinite loop

3. unexpected exit

4. compiler error

5. None of these

Answers

Answer: Infinite loop

Explanation:

A while loop terminates when the condition within the loop becomes false else the it will continue to loop for ever and thereby lead to memory overflow.

example : while(i<10)

                      {  print("hello");

                        }

  here if value of i <10 then it will print hello, but if there is no condition it will lead to an infinite loop. example : while();

You may declare an unlimited number of variables in a statement as long as the variables are ____.

a.
initialized to the same value

b.
the same data type

c.
properly commented

d.
floating point numbers

Answers

Answer:

b. the same data type

Explanation:

Any number of variables can be declared in a statement as long as the variables have the same data type. For example:

1) int a,b,c,d,e;

Here each of the declared variables a,b,c,d,e have the type int.

2) char p,q,r,s,t,u,v,w;

In this case variables p to w all have the type char.

3) float x,y,z;

x,y and z are all of type float.

Which of the following function headings arevalid? If they are invalid, explain why.
a. One(int a, intb) valid invalid

b. intThisOne(charx) valid invalid

c. char Another(int a,b) valid invalid

d. doubleYetAnother valid invalid

Answers

Answer:

a.invalid

b.invalid

c.invalid

d.invalid

Explanation:

For option a return type of the function is not specified and there is no space between int and b.

For option b there is no space between int and ThisOne and char and x.If there is space then this is valid.

For option c data type of variable b is not specified.

For option d if YetAnother function is without arguments then parenthesis should be there parenthesis are missing in this function heading.

What application of encryption verifies that a document was sent by the person it says it is from? Select one: a. Digital rights management b. Asymmetric encryption c. Cryptographic hash d. Digital signatures

Answers

Answer:

D.

Explanation:

a. is about delivering material only to who is entitled to it

b. is about encrypting and decrypting with two different keys

c. is about proving the integrity of a document (that it hasn't been changed).

d. is a cryptographic hash in combination with private key, so that provides both document integrity and non-repudiation

what is java applets?and can we used java applets in web site??

Answers

Answer: Java applets is the program written in java language that run in web application. Yes, we can use java applets in web sites.

Explanation: Java applets are the minor java language program that runs with the help of internet for the web applications having compatibility to work with java .These programs usually run in web browser for the execution and it is the client side applet. It is used because it serve the purpose of having approachable and interactive features .It is possible to use it in web sites .

Answer: Java applets is the program written in java language that run in web application. Yes, we can use java applets in web sites.

Explanation: Java applets are the minor java language program that runs with the help of internet for the web applications having compatibility to work with java .These programs usually run in web browser for the execution and it is the client side applet. It is used because it serve the purpose of having approachable and interactive features .It is possible to use it in web sites .

Write an if statement that prints the message “Application accepted” if the variable workExperience is greater than or equal to 2 or the variable hasCollegeDegree is true.

Answers

if workExperience >= 2 or CollegeDegree is true:
print “Application accepted”
else:
print “Application denied”

Answer:

if workExperience>=2 or hasCollegeDegree==True:

   print("Application accepted")

Explanation:

In the first line of code, we wrote an if statement that allows us to print a message if and only if the int variable workExperience is greater than 2 or the bool variable workExperience is TrueIn the second line of code, we print the message Application accepted if the if-statement evaluated to True

Note: This code was written in python but you can extend the same concept to any programing language using if, comparison operation, boolean operators and print function.

What width would you choose for the pdf?

Answers

Answer:

I would go for a width of 8.27 inches

Explanation:

The width of your PDF file depends on the project you are working on as well as your use case. Putting that aside, you are always better off making the dimensions of your PDF the same as the dimensions of A4 printing paper, which is 8.27 inches or 21 centimeters (2480 pixels). This is because A4 is the most common printing paper used and will make organization and printing less of a hassle.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

Write an application that can hold five integers in an array. Display the integers from first to last, and then display the integers from last to first.

Answers

Answer:

Create an integer array which holds five integers

Explanation:

I have written a simple program using c# as a programming language.

Here's  the  program:

using System;

public class Test

{

   public static void Main()

   {

       int[] numbers = new int[5];

       Console.WriteLine("enter 5 numbers");

       for (int i=0; i<=4; i++)

       {

          numbers[i]= Convert.ToInt32(Console.ReadLine());

       }

       foreach(int k in numbers)

       {

           Console.WriteLine(k+ "\n");

       }

       Console.WriteLine("----------------------------");

       Console.WriteLine("In reverse");  

       for(int j=4; j>=0; j--)

       {

           Console.WriteLine(numbers[j] + "\n");

       }

       Console.ReadLine();

   }      

}

Explanation of Program:

I have created an array named "numbers"  and assigned 5 as it's fixed size.

I prompted the user to enter numbers up to 5. I read those input numbers using Console.ReadLine() and converted to integers as return type of  Console.ReadLine() is string. I have stored all inputs from user into an array  while reading as below:

    numbers[i]= Convert.ToInt32(Console.ReadLine());

Next step is to print them. We can do it easily using foreach loop where it pulls out elements from an array until it reaches  end of an array and print them on console.

If I need to print them from first to last, the condition is,

    for (int i=0; i<=4; i++)  

as it needs to start from first element

If I need to print them from last to first, the condition is,

    or(int j=4; j>=0; j--)  

as it needs to start from last element

The application that can hold five integers in an array and display the integer from first to last and last to first is as follows;

integers = [15, 17, 8, 10, 6]

print(integers)

x = integers[::-1]

print(x)

Code explanation:

The code is written in python.

The first line of code, we declared a variable named integers. This integers variables holds the 5 integers.The second line of code, we print the the integers from first to last.The next line of code, we reversed the array from last to first and stores it in the variable x. Then, we print the x variable to get the code from last to first.

learn more on array here:https://brainly.com/question/19587167

What is Peer-to-PeerNetworking?

Answers

Answer:

Peer-to-peer networking is a distributed application where computers are get connected to each other and share resources. Peer-to-peer connection can also be an ad-hoc connection as couple of computers connected and sharing files and information with each other. The main advantages of this network is that it is less expensive and easy to set up. Wireless and wired both networks can be configured as peer-to-peer networking.

Triggers can be created in operational systemsto keep track of recently ------------------ records.o Deletedo Updatedo Inserted

Answers

Answer:

Inserted

Explanation:

Triggers can be created in operational systems to keep track of recently inserted records.

________ of Willa Catha present an unadorned picture oflife on the prairies of the Midwestern United States during the19th century.
The stories who
That the novels
The novels which
The novels

Answers

Answer:

"The novels"

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

Based on the sentence, we can see it is mentioning an object that belongs to Willa Catha. Unfortunately, all of them can be possible correct answers based on that information so we need to check which ones make the sentence factually and grammatically correct.

Therefore the only answer that makes this sentence both factually and grammatically correct is the last answer "The novels".

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

) Consider the array called myArray declared below that contains and negative integers. Write number of positive integers in the array. That is, your loop display the message "Number of positive integers is 5" a loop statement to count and display the should (4 points) int myArray[]卟1,3,-9,9,33,-4,-5, 100,4,-23); Note: The loop should always work without modification even if the values in th array are changed

Answers

Answer:

#include <iostream>

using namespace std;

int main()

{

 

  int arr[]={3,-9,9,33,-4,-5, 100,4,-23};

  int pos;

  int n=sizeof(arr)/sizeof(arr[0]);

  for(int i=0;i<n;i++){

      if(arr[i]>=0){

          pos++;

      }

  }

  cout<<"Number of positive integers is "<<pos<<endl;

  return 0;

}

Explanation:

create the main function in the c++ programming and declare the array with the element. Then, store the size of array by using the formula:

int n=sizeof(arr)/sizeof(arr[0]);

after that, take a for loop for traversing the array and then check condition for positive element using if statement,

condition is array element greater than or equal to zero.

if condition true then increment the count by 1.

this process happen until the condition true

and finally print the count.

Generally, what is the term for storage locations in a processor?

Answers

Answer: Registers

Explanation:

Registers are small storage locations identified by different types of registers. The function of the register is to provide data for immediate processing to the CPU. These registers hold data temporarily and provide easy access of data to the processor.

. A register in a computer has a of bits. How many unique combinations can be stored in the register?

Answers

Answer:

The number of unique combinations stored in the register totally dependent upon the number of bits the register can hold.

Explanation:

Suppose if the register is 2-bit.Then it can have (2²) 4 unique combinations of the bits and those combinations are 00,01,10,11.For a 3 bit register there are (2³) or 8 unique combinations those are 000,001,010,011,100,101,110,111.So for a n-bit register there can be 2ⁿ unique combinations there.

Write about the future of Reliability and Security in Software Engineering.

Answers

Answer:

Future of Reliability and Security in Software Engineering:

Software reliability refers to a system which is failure-free operations and it is related to many aspects of software and testing process. It is very important as it is directly affects the system reliability. Testing is a best method to measure software reliability. Software can be accessed using reliability information.

As, software reliability, security are tightly coupled with each other and software security problem becoming more severe with the development of the internet. Many software application have security measurement against malicious attacks, so the future of security testing improves the software flaws.

List and explain the error in the code

public class Weekdays {

public static void main(String[] args) {

final String[] WEEKDAYS = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}

System.out.println("List of weekdays:");

for (int i = 1; i
System.out.println(WEEKDAYS[i]);

}

Answers

Answer:

Errors:

1. semicolon is missing in the declaration of string.

2. for loop is not complete.

3. one curly braces is missing for closing class.

Explanation:

In the programming, semicolon is used at the end of the statement as a terminator.

in the declaration of string array semicolon is missing.

for loop is incomplete.

syntax of for loop;

for(initialization;condition;increment/decrement)

{

  statement;

}

and finally curly braces in the programming braces must be enclose.

here, the braces of the class is missing.

Describe the phases through which a program goes during its lifecycle. explain your answer with the help of diagram

Answers

Answer:

The image of the life cycle of program is attached please refer it.

1. Requirement:- When there is a problem the there is need of program.

2. Analysis:- In this phase all the requirements are collected.

3. Design:- It is an important phase in the program life cycle .The design of problem is generated.

4. Coding:- In this phase the program is coded as per the design.

5. Testing:- In this phase the testing of the program is done to make sure that the program is working properly.

6. Deployment:- In this phase the program comes into the use.

Write a C++ programme that asks the user to enter his age in days.Calculate then his age in:
Years – Months –Days

1 year = 365 days

1 year = 12 months

1 month = 30 days

Answers

C++ program that asks the user to enter his age in days

#include <iostream>

using namespace std;

void Findage() //Defining function

{

int a=0,d=0, m=0, y=0, r=0;

cout<<"Enter Age in Days= "; //Taking input

cin>>a;

   if(a>365) //If age is greater than 365

{

y=(a)/365;

r=a%365;

if(r>30)

{

m=r/30;

d=r%30;

}

else

{

d=r%30;

}

}

else //if the age is less than 365

{

if(a>30)

{

m=(a)/30;

d=a%30;

}

else

{

d=a;

}

}if(a==365) //Printing output

{ cout<<"Your Age in Calender"<<endl;

 cout<<"Year = 1"<<endl;

}

else

{

cout<<"Your Age in Calender"<<endl;

cout<<"Years= "<<y<<" Month="<<m<<" Days= "<<d<<endl;

}

}

int main()

{

Findage(); //Calling function

return 0;

}

Output

Enter Age in Days= 3697

Your Age in Calender

Years= 10 Month=1 Days= 17

A C++ program can be written to calculate a user's age in years, months, and days by dividing the total number of days provided by the user by 365 to find years and then dividing the remainder by 30 to calculate months, with the final remainder indicating the days.

A C++ program that calculates a user's age in years, months, and days from the age in days can be composed using simple arithmetic operations. Given that 1 year is 365 days, 1 year is 12 months, and 1 month is 30 days, the following process can be followed:

Ask the user for their age in days.

Use the remainder of the previous division to calculate the number of months by dividing by 30.

The remainder of the last division will give the number of days.

The resulting calculations will give the user's age in years, months, and days.

A ____ report is a type of detail report in which a control break causes specific actions, such as printing subtotals for a group of records.
Answer
control break
stratified
subgroup
character

Answers

Answer: Control Break

You can tell that the equals() method takes a ____ argument because parentheses are used in the method call.

a.
Boolean

b.
Double

c.
String

d.
Null

Answers

Answer:

c. String

Explanation:

The equals method in java String class takes an object reference as a parameter. We can compare two Strings with the help of equals method of the String class. The equals() method of the java String class compares the given strings based on the content of the string.

Use of the String equals method:-

if (stringOne> stringTwo) it will return a positive value.

if both of the strings are equal lexicographically  means

(stringOne == stringTwo) it will return 0.

if (stringOne < stringTwo) it will return a negative value.

Which of the following Boolean exxpressions tests to see if x is between 2 and 15 (including 2 and 15)? A. (x <15 || x> 2) B. (2 2) && (x<= 15) D. (22)

Answers

Answer:

A. (x < 15 || x > 2)

Explanation:

The operator '||' is used for OR operation. it is used in between the conditions and give the result as Boolean (TRUE or FALSE).

There are four possible result:

First condition TRUE, second condition TRUE then result will be TRUE.

First condition TRUE, second condition FALSE then result will be TRUE.

First condition FALSE, second condition TRUE then result will be TRUE.

First condition FALSE, second condition FALSE then result will be FALSE.

In the question:

Option A: (x < 15 || x > 2)

x will be in between the 2 and 15, if it less than 15 and greater than 2. So, the expression follow the condition.

Option B: (2 2) && (x<=15)

it not the correct way to write the condition,  (2 2) is not allowed.

Option D:  (22)

it also not true. it show the value 22.

Therefore, the correct option is A.

Cash cows are always in

a. Introductory industry

b. Growing industry

c. Mature industry

d. Declining industry

Answers

Answer:

The correct answer is C. Cash cows are always in mature industry.

Explanation:

A cash cow is a company, business area or product that generates a large free cash flow over time. Cash flow depends on the profitability of the company or product, that is, revenues are greater than costs, but also because the surplus is not tied up in the business in the form of working capital.

The cash flow in a company can be used to pay off debt but also as a dividend to owners. An individual product that constitutes a cash cow can help to finance other activities in the company or group.

How many characters does the "short text" have?

Answers

Answer:

Total number of characters in "short text" is 10.

Total number of distinct characters is 8.

Explanation:

List of characters in "short text":

s,h,o,r,t, ,t,e,x,t - 10

Set of distinct characters is:

s,h,o,r,t, ,e,x - 8

The length can be determined programmatically in Java using String.length() api.To determine distinct characters, individual characters can be added to a Set and then the set size can be computed.

Programming: Write a recursive function to_number that forms the integer sum of all digit characters in a string. For example, the result of to_number("3ac4") would be 7. Hint: If next is a digit character ('0' through '9'), function is_digit(next) in header will return true.

Answers

yes

Explanation:

isn't really noted but if the sequence is in the given order the ("3at4") could be expressed in a ('0' to '9' )format

.When one component modifies an internal data item in anothercomponent we call this:
A.content coupling B.common coupling C.controlcoupling D. all of the above

Answers

Answer:

A. content coupling

Explanation:

When one component modifies an internal data item in another component we call this content coupling.

__________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe brands of the association rather than to sell the fruit of eachgrower separately.
There
One
It, which
Why

Answers

Answer:

There

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

The Correct and only answer for the sentence given in the question is "There". From the four answers given, "There" is the only answer that makes factual and grammatical sense in the sentence displayed. Therefore it is the correct answer.

** "One" could work if you took out the "is" after it, otherwise it will just be grammatically incorrect. **

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

What are the two categories of problems that we can simply convert
to parallel code?

Answers

percentage and decimals

Which algorithm makes the most efficient use ofmemory?

Answers

Answer:

Best-fit Algorithm

Explanation:

Best-fit: Allocating the smallest memory location that is greater than or equal to the size of process.

Example

Let these are the memory locations-210kb,310kb,260kb,610kb

                    and size of processes-160kb,450kb,250kb,300kb

For the first-fit,

We allocate 160 kb to the 210kb memory location

Then, we allocate 450 kb to the 610kb because others don't have the size.

Then,we allocate 250kb to the 310 kb.

300 kb will stop,as no memory locations can execute.

For the Best-fit,

We allocate 160 kb to the 210kb memory location

Then,we allocate 450kb to the 610kb.

Then,we allocate 250kb to the  260kb not 310kb according to best-fit.

Then we allocate 300kb to the 310kb.

For the worst fit,

We allocate 160 kb to the 610kb memory location according to the worst-fit algorithm.

Then,we can't allocate 450kb to any memory location.

Then,we allocate 250kb to the 310kb .

We can' allocate 300kb in 260kb memory location.

As we can see from this example that in First-fit algorithm 300kb process will stop as no memory location is there.

In worst-fit algorithm ,We can't allocate 450kb,300kb to any memory locations.

In Best-fit algorithm,we can allocate the process to each location,so this algorithm is using memory in a efficient way.    

Other Questions
The topic of surrogate mothers interested Professor Snyder. Snyder read the available materials on the topic andwanted to develop an age, education, and income profile of women who serve as surrogate mothers in the UnitedStates. To develop this profile, Snyder should undertake a(n): panel study trend study explanatory study descriptive study cohort study The medial edge of the popliteal fossa is created by which muscle?A. GracilisB. SemitendinosusC. Biceps femorisD. All of the above The only difference between variable and absorption costing is the expensing of ________.A) direct manufacturing costs B) variable marketing costs C) fixed manufacturing costs D) variable administrative costs A company that makes thing-a-ma-bobs has a start up cost of $18263. It costs the company $1.14 to make each thing-a-ma-bob and the company charges $4.06 for each thing-a-ma-bob. Let x represent the number of thing-a-ma-bobs made. Write the cost function for this company. Write the revenue function for this company. Write the profit function for this company. Which point of view, often used in speeches and autobiographies, uses pronouns such as I and we? A. Objective third person B. Second person C. First person D. Limited third person Can someone help me with this math question it involves transformation When the price of good A rises from $11 to $33, the quantity of good A demanded decreases from 400400 to 200200 units a day and the quantity of good C demanded increases from 150150 to 250250 units a day. From this information, we can determine that _______. A. the cross elasticity of demand is positive, so the two goods are substitutes B. the goods are complements because as the price of good A changes so does the quantity demanded of good C C. the cross elasticity of demand is less than 1, so the two goods are substitutes D. good C is a normal good because as the price of good A rises, people switch to good C Which of the following graphs is described by the function given below? y = 2x 2 + 6x + 3 The Vertex of a parabola is at (8-1), and it's why intercept is negative 17, which function represents the parabola In the long run, both monopolistic competition and competitive markets result in: a) a wide variety of brand-name choices for consumers. b) an inefficient allocation of resources. c) zero economic profit for firms. d) excess capacity. e)insufficient capacity. Cover food in the microwave with plastic wrap to?absorb splatters, moisture, or spillshold in some of the moisturehold in all moisture Icd 10 code for hyperlipidemia unspecified A 50-foot ladder leans against a wall 15 feet from the base of the wall. What is the measure of the angle formed by the ladder and the wall? Please show all work. ________ is one of a group of sleep disorders in which unwanted, disruptive motor activity and/or experiences during sleep play a role. A. insomnia B. NREM phase C. parasomnia D. REM phase ]6. Which neurotransmitter stimulates the beginning of muscle contraction and movement? A. Acetylcholine B. Dopamine C. Epinephrine D. Serotonin Put the following events of the adaptive immune response in the order they occur.(a) The antigen-presenting macrophage and some of the bacteria enter the lymph and float down a lymph vessel to the lymph node.(b) Cytokines, antibodies, and cytotoxic T cells flow through the blood, activating the other immune cells there that are part of the innate immune response and directing them toward the site of infection. The inflammation triggered by the innate immune response allows these immune cells to enter the infected tissue.(c) You cut yourself and bacteria enter the wound.(d) At the site of infection, antibodies neutralize, opsonize, and agglutinate the bacteria. The work of the antibodies makes it easier for the phagocytic cells of the innate immune system to destroy the bacteria. Cytotoxic T cells kill body cells that are infected, leaving scar tissue at the site of the wound.(e) Helper T cells at the lymph node use their T cell receptors to bind the antigens on the surface of the dendrite and bacteria. This triggers the helper T cells to reproduce and to release cytokines.(f) A dendrite near the cut phagocytizes some bacteria and uses MHC proteins to present exogenous antigens from the destroyed bacteria on its surface.(g) B cells at the lymph node use their B cell receptors to bind to the antigens on the surface of the dendrite and the bacteria. These B cells also bind to the cytokines being produced. This triggers the B cells to reproduce and to start making lots of antibodies. The cytokines also trigger cytotoxic T cells to reproduce. Hijk is definitely a parallelogram. true or false? what is 99.96 rounded to the nearest tenth Jules Sylvester had always loved reptiles. When he was asked by a movie producer if he could locate some anaconda snakes for a movie, a business was born. Sylvester is the proud owner and operator of Reptile Rentals. The California-based business, which he started with no financial help from anyone, is often called on to provide "creepy, crawly" moments in the movies. Jules Sylvester is an example of a: . In lab we used 40 ml of 6M NaOH in making soap.How many moles of NaOH was in this volume?