Binary And Hexadecimal Numeration And Logical Operations Worksheet - Object Oriented Programming In Java, Marian Manyo Page 10

ADVERTISEMENT

J A V A
L A B
M A N U A L
D. Convert the base 16 numerals to base 2 and base 10.
a. 43
= _______________________________
= _____________________
16
2
10
b. BD
= _______________________________
= _____________________
16
2
10
E. Convert base 10 numerals to base 16 and base 2.
a.
11011100
= _____________
= _____________________
2
16
10
b.
11101
= _________________
= _____________________
2
16
10
F. Convert the base 10 numerals to base 16 and base 2.
c.
45
= _____________________
= ___________________________
10
16
2
d. 165
= _____________________
= ___________________________
10
16
2
1.5 LOGICAL OPERATIONS
Given two bits as operands, there are logical operations that result in a third bit. The operations AND,
OR, XOR, and NOT are called Boolean operations after the nineteenth century logician George Boole.
NOT is a unary operator, meaning that it is applied to a single operand that has one of two values, either
true or false. The other operations are applied to two operands and are, therefore, binary operands. For
the following examples, the operands are two statements P and Q, which are either
or
. Suppose
true
false
P:
December 25 is Christmas Day
is true
Q:
February 13 is Valentine's Day
is false
AND
The statement
P
December 25 is Christmas Day AND February 13 is Valentine's Day
AND
False
True
is
. That is, P AND Q is
.
false
false
In fact, P AND Q is
only if both P and Q are
.
False
F
F
true
true
Q
True
F
T
false
true
Let the binary digit 0 represent
and 1 represent
.
When using binary digits, the rule for computing P AND Q translates into
0
1
0
1
AND 0
AND 0
AND 1
AND 1
0
0
0
1
P A G E 1 . 1 0
M A R I A N M A N Y O , M A R Q U E T T E U N I V E R S I T Y

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education