Bit_Masking

Bit_Masking

University

10 Qs

quiz-placeholder

Similar activities

Google Classroom

Google Classroom

7th Grade - University

12 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Web Designing Quiz-2

Web Designing Quiz-2

University

10 Qs

HTML

HTML

University

13 Qs

Teste python- Unesp-Jaboticabal

Teste python- Unesp-Jaboticabal

University

10 Qs

07 - Map

07 - Map

University

15 Qs

IOTA : Web Development Bootcamp Quiz 2

IOTA : Web Development Bootcamp Quiz 2

University

14 Qs

have fun with econometrics

have fun with econometrics

University

15 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