Given the following variables, give the result of each of the following operations (show all 8 bits):
Question:
Given the following variables, give the result of each of the following operations (show all 8 bits):
int num1 =0b00110101, num2 =0b11001010, ans;
A. ans = num1 \& num2;
B. ans = num1 | num2;
C. ans \(=\sim\) num2;
D. ans = num1 ^ num2;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Guide To Java A Concise Introduction To Programming
ISBN: 978-3031228414
2nd Edition
Authors: James T. Streib, Takako Soma
Question Posted: