Bit_Masking

Bit_Masking

University

10 Qs

quiz-placeholder

Similar activities

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

2025 python class first quiz

2025 python class first quiz

9th Grade - University

10 Qs

GIT COURSE

GIT COURSE

University

13 Qs

Fondos CSS3

Fondos CSS3

University

10 Qs

QUIZZ 1 : DATABASE FUNDAMENTALS

QUIZZ 1 : DATABASE FUNDAMENTALS

University

10 Qs

SO-750

SO-750

University

10 Qs

Mayor, menor o igual

Mayor, menor o igual

KG - University

10 Qs

introduction to computer graphics

introduction to computer graphics

University

10 Qs

Bit_Masking

Bit_Masking

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Kirti Aggarwal

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers