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
djverab [1.8K]
2 years ago
15

Write a C program that right shifts an integer variable 4 bits. The program should print the integer in bits before and after th

e shift operation. Does your system place 0s or 1s in the vacated bits?
Computers and Technology
1 answer:
Sindrei [870]2 years ago
4 0

Solution :

#include<$\text{stdio.h}$>

#include<conio.h>

void dec_bin(int number) {

$\text{int x, y}$;

x = y = 0;

for(y = 15; y >= 0; y--) {

x = number / (1 << y);

number = number - x * (1 << y);

printf("%d", x);

}

printf("\n");

}

int main()

{

int k;

printf("Enter No u wanted to right shift by 4 : ");

scanf("%d",&k);

dec_bin(k);

k = k>>4; // right shift here.

dec_bin(k);

getch();

return 0;

}

You might be interested in
what is the name of the fields in an x.509 digital certificate that are used when the parties negotiate a secure connection?
Zigmanuir [339]

Answer:

Image result for what is the name of the fields in an x.509 digital certificate that are used when the parties negotiate a secure connection?

Common applications of X. 509 certificates include SSL/TLS and HTTPS for authenticated and encrypted web browsing, signed and encrypted email via the S/MIME protocol, code signing, document signing, client authentication, and government-issued electronic ID.

Explanation:

8 0
3 years ago
List some of the ways that healthcare information technology is making healthcare more of a self-service industry?
harkovskaia [24]

Health information technology (HIT)) is "the utilization of data preparing including both PC equipment and programming that manages the capacity, recovery, sharing, and utilization of medicinal services data.

<u>Explanation:</u>

  • Improving personal satisfaction is one of the primary advantages of incorporating new advancements into medication.
  • Restorative advancements like negligibly intrusive medical procedures, better-observing frameworks, and progressively happy with checking gear are enabling patients to invest less energy in recuperation and additional time getting a charge out of a solid life.
  • An essential advantage of offering self-administration checkouts is that clients need them, and effective retailers give what their clients need.
  • The principal innovation is advantageous to people for a few reasons. At the therapeutic level, innovation can help treat increasingly wiped out individuals and subsequently spare numerous lives and battle exceptionally hurtful infections and microscopic organisms.
  • Indeed, three explicit reasons that innovation is acceptable is that it spares lives by improving prescription, keeps us associated with one another, and gives instruction and stimulation.
  • One motivation behind why innovation is acceptable is that it has spared numerous lives.
  • Innovation additionally can be used to improve instructing and learning and help our students be successful.
3 0
3 years ago
Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
Ket [755]

Answer:

The complete Matlab code along with step by step explanation is provided below.

Matlab Code:

function Req=ParallelR(Number)

Number=input('Please enter the number of resistors: ');

if Number>10 | Number<=0

   disp('Invalid input')

return

end

R=0;

for i=1:Number

r=input('Please enter the value of resistor: ');

R=R+1/r;

end

Req=1/R;

end

Explanation:

Parallel resistance is given by

\frac{1}{Req} = \frac{1}{R_{1}} + \frac{1}{R_{2}} + \frac{1}{R_{3}}...+\frac{1}{R_{N}}

First we get the input from the user for how many parallel resistors he want to calculate the resistance.

Then we check whether the user has entered correct number of resistors or not that is from 1 to 10 inclusive.

Then we run a for loop to get the resistance values of individual resistors.

Then we calculated the parallel resistance and keep on adding the resistance for N number of resistors.

Output:

Test 1:

Please enter the number of resistors: 3

Please enter the value of resistor: 10

Please enter the value of resistor: 20

Please enter the value of resistor: 30

ans =       60/11

Test 2:

Please enter the number of resistors: 11

Invalid input

Test 3:

Please enter the number of resistors: 0

Invalid input

8 0
2 years ago
PLEASE HELP ASAP!!!
Studentka2010 [4]

If you are using CSS :

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

HTML

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

for HTML:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Sample table</title>

<style>

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

</style>

</head>

<body>

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

</body>

</html>

3 0
3 years ago
How was wifi made? bro
Helen [10]

Answer: "Once a Transmitter receives data from the internet, it converts the data into a radio signal that can be received and read by WIFI-enabled devices. When was WIFI invented? Wifi was invented and first released for consumers in 1997 when a committee called 802.11 was created."

(Non Of This Information Is Mine I Have No Rights Or Ownership Not For Plagiarism Purposes Information Based Only 2022.)

Explanation: ...

3 0
2 years ago
Read 2 more answers
Other questions:
  • A database on a mobile device containing bands, sub-bands and service provider IDs allowing the device to establish connection w
    9·1 answer
  • When naming a file you should use the _____________ instead of a space in a filename.
    6·1 answer
  • To keep from overwriting existing fields with your Lookup you can use the ____________ clause.
    14·2 answers
  • What process combines data from a list with the content of a document to provide personalized documents?
    9·2 answers
  • Which of the following code correctly registers a handler with a button btOK?a. btOK.setOnAction(e -&gt; System.out.println("Han
    6·1 answer
  • What are some ways to find out what skills you need to develop at work? Check all of the boxes that apply.
    15·2 answers
  • Do u have all the subjects​
    12·2 answers
  • A _ shows the end of a page . ​
    11·2 answers
  • Please describe the role of games in modern society!
    5·2 answers
  • to provide for ecmascript compatibility in older browsers, you can use group of answer choices javascript shivs javascript shims
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!