Activity 2 How is the word length of a two’s complement representation changed without affecting its value? In this activity, we are going to study how the word length of a two’s complement representation is changed without affecting its value.
Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 1. Find out the 8-bit representation of two’s complement of –410. 8-bit binary representation of 410 = 0000 01002 One’s complement of –410 = 1111 2 Two’s complement of –410 = 2 1011 1111 1100
Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 2. Find out the 16-bit representation of two’s complement of –410. 16-bit binary representation of 410 = 2 One’s complement of –410 = 2 Two’s complement of –410 = 2 0000 0000 0000 0100 1111 1111 1111 1011 1111 1111 1111 1100
Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 3. Hence or otherwise, suggest the steps of converting a two’s complement representation from m-bit to n-bit (where n > m). ________________________ ________________________________ ________________________ ____________ If the m-bit representation is non-negative (i.e the leftmost bit is 0), add or remove the leading ‘0’ to the left of the m-bit representation, forming an n-bit representation. If the m-bit representation is negative (i.e. the leftmost bit is 1), add or remove the leading ‘1’ to the left of the m-bit representation, forming an n-bit representation.
Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 3. Hence or otherwise, suggest the steps of converting a two’s complement representation from m-bit to n-bit (where n > m). ________________________ ________________________________ ________________________ ____________ If the m-bit representation is non-negative (i.e the leftmost bit is 0), add or remove the leading ‘0’ to the left of the m-bit representation, forming an n-bit representation. If the m-bit representation is negative (i.e. the leftmost bit is 1), add or remove the leading ‘1’ to the left of the m-bit representation, forming an n-bit representation.