logo

Data Representation and Digital Logic Assignment 1

   

Added on  2024-04-25

12 Pages1641 Words293 Views
 | 
 | 
 | 
Student Name: Kwame Kyei Ampofo Agyapong
Student ID: 11615762
Subject Code: ITC544
Assignment 1: Data Representation and Digital Logic
Page 1 of 12
Data Representation and Digital Logic Assignment 1_1

Contents
Question 1..................................................................................................................................3
Part (a)....................................................................................................................................3
Part (b)....................................................................................................................................4
Question 2..................................................................................................................................8
Part (a)....................................................................................................................................8
Part (b)....................................................................................................................................9
Appendix..................................................................................................................................11
List of Figures
Figure 1- Circuit Diagram of the Boolean function.................................................................10
Page 2 of 12
Data Representation and Digital Logic Assignment 1_2

Question 1
Part (a)
As the word size is given as 8 bits, therefore, n=8 can be taken.
(I) For One’s complement
The general representation range of 1’s complement is [( 2n11) ;( 2n11) ]
Therefore, the range of 1’s complement is going to be:
=[( 2811) ; ( 2811) ]
= [-127; 127]
After that converting them into binary I get,
10000000 to 11111111 which represents -127 to -0.
(II) For two’s complement
The general representation range of the 2’s complement is [( 2n1 ) ;( 2n11) ]
Therefore, the range of 2’s complement is going to be:
= [( 281) ; ( 28 11) ]
= [-128; 127]
Now on converting the range into the binary equivalent I get,
10000000 to 11111111 which is going to represent -128 to -1.
(III) For signed magnitude
The general representation range is -2(n-1) to +2(n-1)
On substituting the n=8 I get,
= -2(8-1) to +2(8-1)
= -128 to 128
On converting the rage into decimal equivalent I get,
00000000 to 01111111 which is going to represent 0 to 127.
(III) For the unsigned magnitude
The range is going to be 10000000 to 11111111.
It is going to represent 128 to 255.
Page 3 of 12
Data Representation and Digital Logic Assignment 1_3

Part (b)
I. 0x5AB into Octal
As 0x represents the Hexadecimal number. So the conversion of the hexadecimal to the octal
number is going to be as follow:
Firstly, I am going to convert the hexadecimal number to the decimal equivalent. For that
certain equation is required which is shown below:
= 5*162 +10*161 +11*160
=1280+160+11
= (1451)10
Now to convert into the octal certain procedures has to be followed which is shown below:
8 1451
8 181 3
8 22 5
2 6
So the octal number is (2653)8 or it can be represented as 0o2653.
II. 101101.1012 into Decimal
For that I have to follow certain steps which is shown below:
=1*25+ 0*24+ 1*22+ 0*21+ 1*20
= 32 + 0 + 8 + 4 + 0 + 1
= 45
Now, for decimal part i.e. 101,
I have done certain calculation which is shown below:
= 1*2-1 + 0*2-2 +1*2-3
= 0.5 + 0 + 0.125
= 0.625
On combining both part, solution is going to be:
= (45.625)10
III. 12348 into Binary
To perform this conversion, I have to convert this into decimal. For that certain steps have to
be followed which are shown below:
= 1*83+ 2*82+ 3*81+ 4*80
= 512+ 128 + 24 + 4
Page 4 of 12
Data Representation and Digital Logic Assignment 1_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents