Textbook Notes (280,000)
US (110,000)
Brandeis (100)
COSI (10)
Chapter 1.2

COSI 29a Chapter Notes - Chapter 1.2: Bitwise Operation


Department
Computer Science
Course Code
COSI 29a
Professor
Cherniack Mitch
Chapter
1.2

This preview shows half of the first page. to view the full 2 pages of the document.
Chapter 1.2 Outline
Propositional Equivalences
Pages 20 28
Logic and Bit Operations
A 1 bit represents true and a 0 bit represents false. Often, programs represent as OR, as
AND, and as XOR.
A bit string is a sequence of bits, and the length of the string is the number of bits in the string.
The bitwise operations are the bit operations of bit strings.
Ex: The bitwise operations of two strings are shown:
0110110110
1100011101
___________
1110111111 bitwise OR
0100010100 bitwise AND
1010101011 bitwise XOR
Logical Equivalences
A compound proposition that is always true is called a tautology.
A compound proposition that is always false is called a contradiction.
A proposition that is neither is a contingency.
Ex: p ¬p is a tautology. p ¬p is a contradiction.
Propositions p and q are logically equivalent if p q is a tautology.
Logically equivalent propositions are denoted as p q. Also, it can be denoted as p q.
find more resources at oneclass.com
find more resources at oneclass.com
You're Reading a Preview

Unlock to view full version