
Bit_Masking
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Kirti Aggarwal
Used 5+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following expression do?
x = (x<<1) + x + (x>>1);
multiplies an integer with 7
multiplies an integer with 3.5
multiplies an integer with 3
multiplies an integer with 8
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose we have a set {1, 2, 3}. Find the XOR of all the subsets of the set.
1
2
3
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Right shift(>>) and Left shift(<<) are equivalent to _____ by 2.
multiply and divide
divide and multiply
addition and subtraction
subtraction and addition
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If we want to invert all the bits of a number, then which bitwise operator should be used?
~
&
|
^
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression? (num ^ 0)
it will print 0
it will print num
it will print 1
none
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is not a bitwise operator?
&
&=
|=
<=
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public static void main(String[] args) {
byte z = 16;
int x;
x = z << 3;
System.out.println("Value of z= " + z);
System.out.println("Value of x= " + x);
}
Value of z= 16
Value of x= 128
Value of z= 16
Value of x= 2
Value of z= 1
Value of x= 128
Value of z= 1
Value of x= 2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
รถ
Quiz
•
University
10 questions
Excel Básico 01
Quiz
•
University
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
15 questions
Informatyka - sprawdź swoją wiedzę
Quiz
•
University
10 questions
KIỂU DỮ LIỆU CÓ CẤU TRÚC
Quiz
•
11th Grade - University
10 questions
Pengantar Coding
Quiz
•
University
15 questions
Dasar Desain Grafis
Quiz
•
12th Grade - University
15 questions
sistema de archivos
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
