Combinepdf
Combinepdf
Instructions
1. Don’t copy data from internet, you may take concept and then type in your own words.
2. Don’t copy from your class fellow because plagiarism will be checked and you will get NO
CREDIT if data is copied.
3. Viva will be conducted on the completion of the paper, so be prepared conceptually about
what you type here in your paper.
4. Write your answers in the given space of this paper sheet, for question 1 you may add
more rows to add more terms and for question 2 you may extend the box.
Question 1: Watch all video lectures on DLD (three lectures per day, my suggestion) and find out
the terms being used there. Write the terms and their description in your own words,
3 Binary number system Represent the number system of base 2-(0 or 1) is known as binary
number system.
2 12
2 6-0
2 3-0
1-1
8 12
1-4
Octal number = 14
16 20
1-4
Hexadecimal number = 14
As we solve here;
0 0 1 1 0 1. 0 0 1 1 0 0
As we solve here
2 4
2 2-0
1-0
100
2 2
1-0
10
16 34
2-2
16*0.16 = 2.56
16*0.56 = 8.96
16*0.96 = 15.36
16*0.36 = 5.76
2 2
1-0
10
2 5
2 2-1
1-0
101
2 4
2 2-0
1-0
100
19 Binary complements The binary complements is a number is create a revers of all bits as
in the bracket (0 to 1 and 1 to 0) and then add 1 to given binary
number.
20 1’s complements One’s complements mean that convert 1 into zero and 0 into 1 is
called 1’s complements.
21 2’s complements 2’s complements mean that the first of all we take a binary number
and then take 1’s complements and then 1 add in the answer of 1’s
complements is called 2’s complements
+ 1
22 9’s complements 9’s complements means that 9 subtracted the given all decimal
numbers. Each digit are subtracted in the 9
9999
- 2345
999 456
- 543 + 1
456 457
24 7,s complement 7's complement of a number is obtained by subtracting all bits from
777. 7's complement of a number is obtained by subtracting all bits
from 777. Solution: 7's complement of a number is obtained by
subtracting all bits from 777.
Example: 777
_ 234
543
888
- 345
543
+1
544
Example:
FFFF
- 8765
FFFF
- 2345
DCBA
+ 1
28 Parity bit A bit which acts as a check of a set of binary values, calculated in
such a way that the number of 1s in the set plus the parity bit should
always be even or odd.
31 Logic operation Logic operations create any operations that manipulate Boolean
values. Boolean values are either true or false. They are named after
English mathematician George Boole, who formulated Boolean
algebra, and is widely considered the founder of computer science
theory. They can also be represented as 1 and 0 form.
32 AND operation Logical AND operation is .The AND logic operation returns true
only if The AND logic operation returns true only if either of its
inputs are true. If either of the inputs is false, the output is also
false. In computer programming, the AND operation is usually
written as &&
34 NOT operation In Boolean algebra, the NOT operator is a Boolean operator that
returns TRUE or 1 when the operand is FALSE or 0, and returns
FALSE or 0 when the operand is TRUE or 1. ... The NOT operator is
considered one of the basic operators along with AND and OR in
Boolean algebra. The NOT operator is also known as the logical NOT.
36 NOR Operation The NOR operation is a logical operation on two logical values,
typically the values of two propositions, that produces a value of
true if and only if both operands are false. In other words, it
generate a value of false if and only if at least one operand is true.
38 X-OR operation XOR is a binary operation, it stands for "exclusive or", that is to
say the resulting bit evaluates to one if only exactly one of the bits is
set. This operation is performed between every two corresponding
bits of a number.
42 Max-terms (Product of Max-terms is the form of expression in which sum terms are
sum) products(*) together is called product of sum.
Question 2: Write a program in C++ programming language that provides us with Number System
Conversion. [MARKS: 10+4 = 14]
Input: This program should get Source Number, Input Base and Target Base.
Answer: