0% found this document useful (0 votes)
186 views4 pages

Assignment of Discrete Structure 2

This document contains an assignment submission from Muhammad Asif Lakho with roll number 023 from the 19BS (IT) batch. The assignment is on the subject of Discrete Structures and contains questions on bitwise operations and propositional logic. For question 1, the student performs bitwise OR, AND and XOR operations on pairs of bit strings. For question 2, the student constructs truth tables for various logical expressions. For question 3, the student expresses logical propositions about buying a lottery ticket and winning a jackpot in English sentences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views4 pages

Assignment of Discrete Structure 2

This document contains an assignment submission from Muhammad Asif Lakho with roll number 023 from the 19BS (IT) batch. The assignment is on the subject of Discrete Structures and contains questions on bitwise operations and propositional logic. For question 1, the student performs bitwise OR, AND and XOR operations on pairs of bit strings. For question 2, the student constructs truth tables for various logical expressions. For question 3, the student expresses logical propositions about buying a lottery ticket and winning a jackpot in English sentences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Name: Muhammad Asif

Surname: Lakho
Roll No: 023
Batch: 19BS (IT)
Assignment Subject: Discrete structure
Department: Information Technology

Page | 1
Qno1: Find the bitwise OR, bitwise AND, and bitwise XOR of
each of these pairs of bit strings.

a. 101 1110, 010 0001 b. 1111 0000, 1010 1010

c. 00 0111 0001, 10 0100 1000 d. 11 1111 1111, 00 0000 0000

solutions:
a) 101 1110, 010 0001

OR AND XOR
111 1111 000 0000 111 1111

b) 1111 0000, 1010 1010


OR AND XOR
1111 1010 1010 0000 0101 1010

c) 00 0111 0001, 10 0100 1000

OR AND XOR
10 0111 1001 00 0100 0000 10 0011 1001
d) 11 1111 1111, 000 0000 0000

OR AND XOR
11 1111 1111 00 0000 0000 11 1111 1111

Page | 2
Qno2: Construct a truth table each of the followings.

A. (p ↔ q) ↔ (r ↔ s)

P Q R S ((P ↔ Q) ↔ (R ↔ S))
T T T T T
T T T F F
T T F T F
T T F F T
T F T T F

B. p → ¬q C. ¬p ↔ q

P Q (P → ¬Q) P Q (¬P ↔ Q)
T T F T T F
T F T T F T
F T T F T T
F F T F F F

D. (p → q) ∨ (¬p → q)

P Q ((P → Q) ∨ (¬P → Q))


T T T
T F T
F T T
F F T

E. (p → q) ∧ (¬p → q)

Page | 3
P Q ((P → Q) ∧ (¬P → Q))
T T T
T F F
F T T
F F F

Qno3. Let p and q be the propositions

P: I bought a lottery ticket this week.

Q: I won the million-dollar jackpot.

Express each of these propositions as an English sentence.

a) ¬p b) p ∨ q c) p → q d) p ∧ q e) p ↔ q f) ¬p → ¬q
g) ¬p ∧ ¬q h) ¬p ∨ (p ∧ q)
I did not buy a lottery ticket this week Negation of p
1 A
I bought a lottery ticket this week or won the million-dollar Disjunction of p and
2 B jackpot q
If I bought a lottery ticket this week, then I won the million- If, then statement
3 C dollar jackpot
I bought a lottery ticket this week and I won the million- Conjunction of p and
4 D dollar jackpot q
I bought a lottery ticket this week if and only if I won the Biconditional
5 E million-dollar jackpot Statement
If I did not buy a lottery ticket this week, then I will not win the An if, then statement
6 F million-dollar jackpot. and negate p and q
I did not buy a lottery ticket this week and I did not win the Conjunction and p and
7 G million-dollar jackpot. q are negated
I did not buy a lottery ticket this week and I bought a lottery Negation of p then a
8 H ticket this week or I did not win the million-dollar jackpot. conjunction. Then p
disjunction of negative
q

Page | 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy