answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i;

clrscr();

printf("Enter the number on which left shift operation is to be performed: ");

scanf("%d",&n);

printf("\nBefore shifting the number was: %d\n",n);

i=n<<2; //LEFT SHIFT OPERATION

printf("After shifting the number is: %d\n",i);

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to shift a 8-bit number left by two bits?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the largest prime number that can be stored in 8 bit computer?

An 8 bit number is a maximum of 255, the highest prime number less than or equal to this is 251 or 11111011Ans 2.The above is correct for the largest prime storable in a single 8bit storage location.However the question asked what can be stored in an 8bit computer. Anyone working with numbers would tend to program an 8bit computer to use more than one location to store each number.In fact, since we are talking of prime numbers there is a simple, fast algorithm to store primes very compactly, and recover them quickly and easily. 32KB of RAM can hold all the primes less than 95,000 with room to spare for the compaction and decompaction algorithms.A 1GB memory will hold all the primes less than 3 x 1010 .


What is the simple program for 8bit addition using 8085 microprocessor?

Suppose you want to add 11 and 12.instruction are : mvi a,11h mvi b ,12h mov d,b add b


Can you use ic 7485 as 8bit comparator?

use two of them for 8 bits.


What does Blaster1071 do on YouTube?

He does Let's Plays of Old and Recent 8bit and 32bit games.


How many bits are wide register ACC and B?

32 bit


How many bit make up on ipv4 address?

IPV4 is 32bit (4 times 8bit) rgds


Why are P8 and P9 connectors keyed a certain way?

so they fit correctly into an 8bit or 16bit slot


What is 8bit?

8-bit is a surrounding of a video game e.g. Mega Man. 8-bit is from the Atari Computer System.


How does serial signals convert to parallel signals?

There are many ways to accomplish this but probably the most common is the use of a 'shift register'. A shift register is just a device which takes in the serial binary, and pushes each recorded bit into the next slot in it's 'memory'. so say you are sending an 8-bit number serially, say: 10110110. The shift register would have 8 memory slots, looking like this: 00000000 the digits would usually be transferred right to left, so they'd be sent in this order: 0, 1, 1, 0, 1, 1, 0, 1 sequentially, then out shift register would look like this: 10000000 01000000 10100000 11010000 01101000 10110100 11011010 01101101 once the register saw that it had received 8 bits, it would spit out the 8bit received number: 01101101, which is the mirror image of our original number. If we then take out parallel data lines and send the first one to the eighth, the second to the seventh, etc. we will have: 10110110, our original number, now in parallel format.


How does parallel signals convert to serial signals?

There are many ways to accomplish this but probably the most common is the use of a 'shift register'. A shift register is just a device which takes in the serial binary, and pushes each recorded bit into the next slot in it's 'memory'. so say you are sending an 8-bit number serially, say: 10110110. The shift register would have 8 memory slots, looking like this: 00000000 the digits would usually be transferred right to left, so they'd be sent in this order: 0, 1, 1, 0, 1, 1, 0, 1 sequentially, then out shift register would look like this: 10000000 01000000 10100000 11010000 01101000 10110100 11011010 01101101 once the register saw that it had received 8 bits, it would spit out the 8bit received number: 01101101, which is the mirror image of our original number. If we then take out parallel data lines and send the first one to the eighth, the second to the seventh, etc. we will have: 10110110, our original number, now in parallel format.


How many colors possible if 1 bit pixel is used?

One bit is 2 possible colors, black, 8bit has a possible of 256


How many megabytes make one kilobyte?

8bit = 1 byte1024byte = 1kb1,024kb = 1mb1,024mb = 1gb1,024gb = 1tb