UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

how the right shift operator works on a numerical value?? eg:- 8>>3=?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

first convert numerical value to binary value then arrange into bits and shift 3 bit on right then convert binary value to decimal value.
Comments

Trainer

as per your example 8>>3 first write 8 in binary format then the binary digits should be shifted 3 times sorry the explanation not allowed here.
Comments

Software Development Trainer

x >> y can be seen as x divided by "2 to the power y". Or you can imagine x in binary format, and drop y rightmost digits, adding y 0s at the left.
Comments

C coder

8 = 01000 after right shift no = 0001 right most 3 bits will be discarded. output = 1
Comments

Result oriented teaching professional

Represent the given number in digital form ...bits of 0s and 1s string...Then,perform the shift operation on MSB digits(most significant digits)...RHS, 3 times...convert to decimal and that's the output.
Comments

Computer and Photography Instructor

its a Shift operator and its shifted 3 times in right onwards. all in bit wise. (1000)2 in binary form. after shifting 3 position on rightwords the value is (0001)2 in Decimal value is 1
Comments

Software Professional Trainer with 26+ years of Experience in Software Design and Development

Right shift is equivalent to dividing the number by 2. Here 8 >> 1=4 8>> 2=2 8 >> 3 = 1
Comments

MCA

This operator shifts the first operand the specified number of bits to the right. Excess bits shifted off to the right are discarded. Copies of the leftmost bit are shifted in from the left
Comments

Expert Technical Trainer with 15 years of work experience

The decimal value need to converted to equivalent binary values and then shift right operation is performed
Comments

SUDHIR SHARMA - Computer Trainer based On Delhi

Binary of 8 is "1000" and here by this command 3 bits of "1000" will be shifted to right. Hence Binary will be "0001" so your expressions answer will be "0001" i.e. 1
Comments

View 16 more Answers

Related Questions

What is the actual size of INT in the C language, 2 or 4 bytes?
The actual size to int is determined by the compiler as the program runs. But theoretically the size is 2 bytes. You can increase the size by adding keyword long infront of it to make the size 4 bytes. Eg int a; // 2 bytes Long int b; // 4 bytes
Kunal
How do I get C help in Ubuntu?
Use command line tool 'man'. for example 'man printf' will give you details regarding printf function C
Ashmita
0 0
5
Which websites are best to learn C programming?
There are several reputable websites where you can learn C programming. Here are some popular ones: GeeksforGeeks (geeksforgeeks.org): Offers a wide range of tutorials, practice problems, and articles...
Sarath Chandra
0 0
5
Can you define which header file to include at compile time?
Yes we can do it by using conditional comilation
Thileshwari
0 0
5
What is the use of semicolon at the end of every statement?
Computer languages are just like our normal communication languages. Hindi, eng etc. Enable to communicate us with each other. Similarly computer language helps us to communicate with computer. As a full...
Krishna

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Static and dynamic libraries
A library is a package of code that is meant to be reused by many programs. A static library (also known as an archive) consists of routines that are compiled and linked directly into your program. When...

C for Begginers
C is an procedure oriented programming language. For any begginer the word program is new. Program: Set of instructions to be followed by machine or computer. Instruction Examples: Arithmetic instruction...

Dynamic Memory Allocation in C using malloc()
#include <stdio.h>#include <conio.h>//#include <malloc.h> OR#include <stdlib.h>void main(){ int *ptr, i, n, sum = 0; printf("how many elements ? "); scanf("%d", &n);...

How to write shared library program using C Programming?
Library Name : hellofilename : hello.c#include void Hello(){ printf("Hello World .. How are you 1\n");}======================================Header File:hello.h#ifndef __HELLO_H#define __HELLO_Hvoid Hello(void);#endif===============================Application...

Variables
Variables in C Language:A variable is a name that may be used to store a data value. Unlike constant, variables are changeable, we can change value of a variable during execution of a program. A programmer...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more