edited by
788 views
0 votes
0 votes

In case of right shift bitwise operator in $’C’$ language, after shifting $n$ bits, the leftmost $n$ bits:

  1. are always filled with zeros
  2. are always filled with ones
  3. are filled with zeros or ones and is machine dependent
  4. none of the above
edited by

2 Answers

1 votes
1 votes
In case of right shift bitwise operator in 'C' language, after shifting n bits, the leftmost n bits are filled with zeros or ones and is machine
dependent
Example:
Input: positive number, It will filled with zeros
Input: Negative number — it will filled with ones
Option-C is more appropriate answer.
0 votes
0 votes
For example if we consider 2 it's binary equivalent is 010

If we perform right shift of one bit it will become 001

So left most n bits are filled with zero's

Related questions

1 votes
1 votes
1 answer
1
go_editor asked Mar 28, 2020
469 views
The following determiniotic finite automata recognizes:Set of all strings containing $’ab’$Set of all strings containing $’aab’$Set of all strings ending in $’a...
0 votes
0 votes
0 answers
2
go_editor asked Mar 28, 2020
688 views
Depth ion travels of the following directed graph is:$\text{A B C D E F}$$\text{A B D E F C}$$\text{A C E B D F}$None of the above
0 votes
0 votes
0 answers
3
go_editor asked Mar 28, 2020
1,121 views
The maximum number of nodes in a binary tree of depth $10$:$1024$ $2^{10}-1$ $1000$None of the above
1 votes
1 votes
1 answer
4
go_editor asked Mar 28, 2020
1,225 views
The regular expression given below describes:$r=(1+01)$*$(0+\lambda)$Set of all string not containing $’11’$Set of all string not containing $’00’$Set of all stri...