Você está na página 1de 8

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

Question 01
(A) Difference between Analog & Digital Systems.
Analog Systems

Digital Systems

An Analog signal is one in which the


values taken can be continuous. For
example, if a signal varies in
magnitude between 0 volts and 5
volts, it can take any value between
0 and 5.
They are also less flexible to changes
in design.

A Digital signal, there can only be


discrete values. For example, a
signal ranging from 0 to5 volts could
take the discrete values of 0, 1, 2, 3,
4 and 5 in a digital system.

They are programmable and hence


are flexible to changes in design.

They are denoted by sine waves.

They are denoted by square waves.

Microphone, Radio, Photograph


Camera are the examples of Analog
devices.

DVD player, Cell Phones, Digital


Camera, HDTV are the examples of
Digital devices.

Analog systems convert analog


message into signals that can be
propagate through the channel.

Digital systems convert bits (digits,


symbols) into signals.

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

(B) If temperature changes/rises 0 to 80 o C up to 10 hours, each


hour changes temperature (0, 15, 30, 25, 20, 45, 55, 65, 70, 75
and 80) o C. Then draw the graph diagram of both digital and
analog signal separately.

ANalog System Graph


90
80
65

70

80

55

60
45

50
Temperature

70

75

40

30

30

25

15

20

20

10
0

5
Time

10

11

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

Digital System graph


90
80
70

65

60

80

55

50
Temperature

70

75

45

40

30

30
20

25

15

20

10
0

5
Time

10

11

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

Question 02
(A) CONVERSIONS.
1. (101101.1011)2 = (?)10
= 125 + 024 + 123 + 122 + 021 + 120 + 12-1 + 02-2 + 12-3 + 12-4
= 32 + 0 + 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 + 0.0625
= 45.68

(101101.1011)2 = (45.68)10
2. (123236)10 = (?)2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

123236
61618
30809
15404
7702
3851
1925
962
481
240
120
60
30
15
7
3
1

-----0
-----0
-----1
-----0
-----0
-----1
-----1
-----0
-----1
-----0
-----0
-----0
-----0
-----1
-----1
-----1

(123236)10= (11110000101100100)2
3. (AB3EC5)16 = (?)8
First convert hexadecimal to binary
8421 8421 8421 8421 8421 8421

1010

1011

3
0011

1110

1100

0101

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

Now converting binary to octal


101010110011111011000101
Making 421 Pairs of each
421

421

421

421

421

421

421

421

101

010

110

011

111

011

000

101

(AB3EC5)16 = (52637305)8
4. (CDBA4)16 = (?)2
Converting hexadecimal to binary
Making 8421 Pairs of each.
8421 8421 8421 8421 8421

1100

1101

B
1011

A
1010

0100

11001101101110100100

(CDBA4)16 = (11001101101110100100)2

(B) Solve the Following Problems.


(i)
(ii)

(10000111101)2 = (?)
Grey Code with proof of Binary Number
In this the first bit is copied as its and the first bit is added in second
bit and so on

+ +

+ +

1 GRAY

Now converting now this bit gray to binary

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

Similarly first bit is copied as its and then the copied bit is added in
second bit.

+
1

1
1

1
1

The binary proof is that the last answer which is same as the question.

ii.

(1010100101)2 = find the parity bit?


The parity bit can be found by counting the number of 1s in the bit if
the counted bits are odd then add 1 from LSB is answer and if the
counted bits are even then adding 0 from the LSB is answer.
1010100101
count the number of 1 in this
Five 1s is counted in this so, it means it is odd and after adding 1 from
LSB :10101001011
Answer

(iii) Singed number 011010-101010+111110


= 011010-101010+111110
= 011010 -101010

+111110

Converting this bit to 2s complement


=
-1 0 1 0 1 0

0 1 0 1 0 1

Carry

after inversing this bit add 1 in it.

Muhammad Hamza Rafiq

DLD Assignment#01

(BSCS 3B) Reg#39265

0 1 0 1 0 1
+ 1
0 1 0 1 1 0

After converting into 2s complement now we add all three of these


= 011010+010110+111110
First we add 1 and 2:
1 1 1 1
0 1 1 0 1 0
+
0 1 0 1 1 0

Carry

1 1 0 0 0 0
Now Adding answer to third
1

Carry
1 1 0 0 0 0
+1 1 1 1 1 0

11 0 1 1 1 0

Unsigned 01101011-11010110-11001110

(iv)

= 01101011-11010110-11001110
First we subtract 1 and 2:
0 1 0 1
0
1 1 0 1 0 1 1
-1
1

1 0 1 0 1 1 0
0 0 1 0 1 0 1

Now subtracting this bit to 3.


1 1
0 1
0 1 0 1
1 0 0 1 0 1 0 1
-

1 0 0 1 1 1 0

Muhammad Hamza Rafiq


1

DLD Assignment#01

1 0 0 0 1 1 1

1 0 0 0 1 1 1

(BSCS 3B) Reg#39265

Você também pode gostar