logo

Digital Electronics

   

Added on  2023-01-04

12 Pages1995 Words3 Views
Digital Electronics 1
COMPUTER ARCHITECTURE AND DESIGN
By Name
Course
Instructor
Institution
Location
Date
Digital Electronics_1
Digital Electronics 2
1. Explain the effect of overflow in two’s compliment calculation. Provide an example
showing the addition of two numbers that result in an overflow to support your
explanation.
When dealing with two’s compliment calculation, any pattern of bit that has a bit of zero
(positive number) is similar as an ordinary binary number, (there is no necessity of converting it
back out of the two’s compliment in any way, the number is simply converted straight into
decimal as in ordinary binary number). In case the number has a sign bit 1, this denotes that the
decimal numbers corresponding is negative, and the bit pattern should be converted out of two’s
compliment before being converted into decimal from binary (Merrikh & Bagheri, 2011).
During an addition of two’s compliment, operation produces an outcome that surpasses the range
of system of numbers. This is known as an overflow. An overflow happens when adding positive
numbers when count is past +7. Adding numbers with different signs cannot generate an
overflow, but adding two numbers of same sign can.
Example:
Therefore, the major effect of overflow is that an overflow will only occur during addition of two
numbers with the similar sign (both negative and positive) and the result has the opposite sign
(Ziobro, 2018).
2. Apart from addressing the zero representation anomaly, in what other way does two’s
complement improve on sign and magnitude?
2’s compliment can be improved on sign and magnitude through:
Addition: The adding two’s complement numbers improve on sign and magnitude and the
process needs no exceptional processing even if the operands have opposite signs.
Example:
Digital Electronics_2
Digital Electronics 3
By adding 4 with 7, the magnitude of the two’s compliment increases to 7 and also the sign.
Subtraction: With the help of subtraction by two’s compliment method, the magnitude and sign
of the binary number can be improved. Example:
By subtracting 3 with -4, the magnitude of -4 improves to -1 as well as its sign.
(Purohit & Singh, 2010)
3. Convert to 8-bit two’s complement:
a) 121
b) -53
Convert 121 to binary
2 121 Remainder
2 60 1
2 30 0
2 15 0
2 7 1
2 3 1
2 1 1
0 1
Convert 121 to binary: 1111001
Use 8-bits to represent: 01111001
12110=011110012
Digital Electronics_3
Digital Electronics 4
-53
2 53 Remainder
2 26 1
2 13 0
2 6 1
2 3 0
2 1 1
0 1
Convert -53 to binary: 110101
Use 8-bit to represent: 00110101
Change to negative: 10110101
5310=101101012
4. Convert the following two’s complement numbers to decimal:
a) 1101 1001
b) 0110 0010
Two’s complement = 1101 1001
Complement = 00100110
Add 1 +1
True binary = 0010 0111
Decimal equivalent = 27
b) 0110 0010
Two’s complement = 0110 0010
Complement = 1001 1101
Decimal equivalent = 9D
(Chattopadhyay & Kumar, 2017)
Digital Electronics_4

End of preview

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

Related Documents
IT Fundamental : Question and answer
|15
|1476
|54

Computer Architecture Study Material with Solved Assignments
|9
|1428
|190

bonus assignment.
|2
|448
|166

Computer System And Von Neumann Architecture
|12
|1446
|14

Computer Organization & Architecture
|5
|552
|237

ITC544 - Data Representation & Digital Logic Assignment
|9
|1415
|108