Binary_AND_ExerciseZZ

.docx

School

Howard Community College *

*We aren’t endorsed by this school

Course

MSFT 299

Subject

Computer Science

Date

Apr 29, 2024

Type

docx

Pages

5

Uploaded by JudgeGiraffeMaster1074

Report
Name:____________ SANAULLAH AMIN Bitwise & (AND operation) exercise. Reminder : The bitwise & operator (AND) compares each bit of the first operand to the corresponding bit of the second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0. (source: Microsoft.com) EXAMPLE: Find: 10101100 & 11000101 --------------- 10000100 1) Find: 11101100 & 01101101 -------------- 11101100 & 01101101 -------------- 01101100 2) Find: 01011101 & 11001000 -------------- 01011101 & 11001000 -------------- 01001000 1 ©2022 by Howard Community College.
3) Find: 00110110 & 11001101 -------------- 00110110 & 11001101 -------------- 00000100 4) Find: 10101101 & 11111111 -------------- 10101101 & 11111111 -------------- 10101101 5) Find: 10001101 & 00000000 -------------- 10001101 & 00000000 -------------- 00000000 2 ©2022 by Howard Community College.
6) Find: 10001101 & 10001101 -------------- 10001101 & 10001101 -------------- 10001101 7) Find 145 & 123 a. Convert 145 from decimal to binary:_________ 14510=100100012145 10 =10010001 2 b. Convert 123 from decimal to binary:__________ 123 10 =01111011 2 c. Calculate the & result for a and b: ______ 10010001 & 01111011 -------------- 00010001 d. Convert result from c back to decimal: _________ 000100012=171000010001 2 =17 10 8) Find 145 & 17 a. Convert 145 from decimal to binary:_________ 145 10 =10010001 2 b. Convert 17 from decimal to binary:_________ 17 10 =00010001 2 3 ©2022 by Howard Community College.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help