Professional Documents
Culture Documents
Assignment 1
i. (A^B)vC
ii. X^(YvZ)
I) (A^B)vC
A B C (A^B)vC
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
II) X^(YvZ)
X Y Z X^(YvZ)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
III) (A^B)v(CvD)
0 0 0 0 0 0 0
0 0 0 1 0 1 1
0 0 1 0 0 1 1
0 0 1 1 0 1 1
0 1 0 0 0 0 0
0 1 0 1 0 1 1
0 1 1 0 0 1 1
0 1 1 1 0 1 1
1 0 0 0 0 0 0
1 0 0 1 0 1 1
1 0 1 0 0 1 1
1 0 1 1 0 1 1
1 1 0 0 1 0 1
1 1 0 1 1 1 1
1 1 1 0 1 1 1
1 1 1 1 1 1 1
2. Suppose we define a new integer datatype “MyInt” for which 3 Bytes are
allocated. How many integers can be represented by this data type?
If we allocate 3 bytes for the "MyInt" datatype, we need to calculate the total number of
distinct values that can be represented by these 3 bytes.
Each byte consists of 8 bits, and since we have 3 bytes, the total number of bits
available is 3 * 8 = 24 bits.
For each bit, there are two possible states: 0 or 1. Therefore, the total number of distinct
values that can be represented by 24 bits is 2^24.
Therefore, the "MyInt" datatype, with 3 allocated bytes, can represent a total of
16,777,216 different integers.