Chapter 1 Data Representation and Numbering Systems
Objectives
At the end of this chapter, you should be able to:
1	Describe the different methods of data representations;
2	Describe the characteristics of number representation;
3	Convert a number in any numbering base to other bases;
4	Perform binary arithmetic;
5	State the methods of complements in representing negative numbers; and
6	Perform binary subtraction using complement representations.
References

1.	Richard S. Sandige, “Modern Digital Design,” Mcgraw-Hill Publishing Company.

2.	Theodore F. Bogart Jr., “Introduction to Digital Circuits,” McGraw-Hill Publishing Company.

3.	Thomas C. Bartee, “Digital Computer Fundamentals,” sixth edition, McGraw-Hill Publishing Company.

1. Data Representations
Values in digital systems consist of only two states, one of which is denoted by 0 and the other by 1.  By concatenating several 0s and 1s together, 0-1 combinations can be formed to represent as many different entities as desired.  A combination containing a single 0 or 1 is called a bit (Binary digit).  In general, n bits can be used to distinguish amongst 2n distinct entities and each addition of a bit doubles the number of possible combinations.  
Computers use strings of bits to represent numbers, letters, punctuation marks, and any other useful pieces of information.  In general, there are different ways to represent different forms of information.
1.1 Alphanumeric Codes
An alphanumeric code is the assignment of letters and other characters to bit combinations.  Because assignments of bit combinations to the decimal digits are also included in alphanumeric codes, such codes can also be used to store and manipulate numbers.  (In high-level languages, character strings are represented by alphanumeric codes.)  
Alphanumeric codes include letters, digits and special symbols (both printable control codes such as, $, %, -, and non-printable control codes such as printer line feed, carriage return, etc.  Control codes are used, for example, in communication between input/output devices and a computer).  Letters and digits are often designated by the common name "alphanumeric" symbols.  
The most commonly used codes in information processing are ASCII, and EBCDIC. 
ASCII (American Standard Code for Information Interchange), is the most common code today.  It usually uses seven bits, (7-bit ASCII) to represent 128 different symbols including upper-case and lower-case letters, digits and special symbols, printable and non-printable.  An 8-bit extension uses the eighth bit to add error-detecting capability (parity check) for transferring codes between computers.
EBCDIC (Extended Binary Coded Decimal Interchange Code) is in many respects similar to ASCII.  It is an 8-bit IBM code and as such widely used, although currently not as popular as ASCII.
1.2 Numbers
In principal, numbers are represented in binary numbering system.  However, there are variations in representing different types of numbers, such as integers, floating point numbers, negative numbers, etc.
1.2.1 Characteristics of Number representation
The characteristics of the binary numbering system are the same as decimal numbers.  A numeric value is represented by a series of symbols.  For example, the value five thousand two hundred and thirty two is represented, in decimal, by 5232.
We all know that each digit in the representation carries different capacities.  The significance of the two symbols, 2, in the number are not the same.  One represents two hundred while the other represents two only.  The reason is that the positional significance of the two symbols are different.  Inspection on a digit of a number can tell the significance of the digit.  Due to this nature of representation, each numeric value can be expressed by an arithmetic expression.  For example:

5472.26
can be expressed as:

5  103 + 4  102 + 7  101 + 2  100 + 2  10-1 + 6  10-2
=	5000 + 400 + 70 + 2 + 0.2 + 0.06
In general the integral part of any value can be represented by a sequence of symbols and the fractional part of the value is represented by another sequence of symbols after a radix point.  For example, a number, N, of base, b, can be expressed in a form: 
Nb	=	Si Si-1 ... ... S2 S1 S0 . S-1 S-2 S-3 ... ... S-k
where Nb is the representation of the number N in base b, and Si's are symbols in the numbering system of base b.  For example 5472.2610 represents the decimal number 5472.26 and 5, 4, 7, 2, and 6 are the symbols in decimal system.

The value of the number can be expressed by the polynomial:
N	=	Si bi + Si-1 bi-1 + ... ... + S2 b2 + S1 b1 + S0 b0
	+ S-1 b-1 + S-2 b-2 + S-3 b-3 + ... ... + S-k b-k	(Exp. 1.1)
The rightmost digit in the number is called the Least Significant Digit (LSD) because its significance is the smallest.  On the other hand, the leftmost digit is called the Most Significant Digit (MSD) because it carries the largest significance.
1.2.1 Integers
An integer is simply represented in binary numbering system in which only two symbols are employed, namely 1 and 0.  For example, the binary number, 10112, according to Exp. 1.1, represents the decimal value:
1  23 + 0  22 + 1  21 + 1  20 
=	8 + 0 + 2 + 1
=	1110
A value can be very large.  One can expect that large number of digits re required to represent a value.  In general, an integer usually employs 2 bytes, i.e. 16 bits, which can represent a number up to (216 – 1) or  65535.  For even bigger numbers, long integers may occupy 32 bits or 64 bits.
1.2.2 Binary Coded Decimal (BCD)
An integer can also be represented by BCD format.  A BCD format is one in which the decimal digits are stored in terms of their 4-bits binary equivalents, i.e., binary coded decimal.  The number 9502 would be stored as
	1001	0101	0000	0010
The BCD format is not positional.  This makes BCD arithmetic more complicated since the carry and borrow do not propagate in the same way in all positions.  
1.2.3 Floating point numbers
Floating point representation is used when a number is very large or very small.  It uses a pair of numbers to represent the values.  One number is the value scaled to a standard form with the point located in a certain fixed position, the normalized mantissa in fixed-point notation.  The other is a scaling factor which in effect moves the point form the implied normal position to wherever it belongs for the given number, the exponent.  The notation is based on standard scientific notation, i.e. M  be, where M is the mantissa; b the base and e the exponent.
For example, a single-precision floating-point number used in the IBM 370 or 3000 series consists of a 1-bit sign indicator, a 7-bit exponent with a base of 16, and a 24-bit mantissa.  Since 24 bits correspond to between 6 and 7 decimal digits, we can assume that this number has at least 6 decimal digits of precision for the floating-point number system.  The exponent of 7 bits gives a range of 0 to 127, but because of an exponential bias the range is actually -64 to +63, that is, 64 is automatically subtracted from the listed exponent.  
Consider for example, the machine number
	0 1000010 101100110000010000000000
The leftmost bit is a zero, which indicates that the number is positive.  The next seven bits, 1000010, are equivalent to the decimal number
	1x26 + 0 x 25 + 0x24 + 0x23 + 0x22 + 1x21 + 0x20 = 66
and are used to describe the exponent.  The final 24 bits indicate the mantissa and the machine number represents, in decimal:
	+ ( 2-1 + 2-3 + 2-4 + 2-7 + 2-8 + 2-14 )  1666-64 = 179.015625.
To ensure uniqueness of representation and obtain all the available precision of the system, at least one of the four leftmost bits of the mantissa of a machine number is required to be a one, i.e. M  e-1.  Consequently, this requirement also implies that the smallest normalized, positive machine number that can be represented is 
		0 0000000 000100000000000000000000 = 16-65  10-78
while the largest is 
		0 1111111 111111111111111111111111 = 1663  1076.
Numbers occurring in calculations that have a magnitude of less than 16-65 result in what is called underflow, and are often set to zero, while numbers greater than 1663 result in an overflow condition and cause the computations to halt.
2. Commonly used Numbering Systems
In addition to binary number system, we are also interested in the octal, base 8, and hexadecimal, base 16, number systems.  Because computers only deal with binary numbers, the use of the octal and hexadecimal numbers is solely for the convenience of human people.  Since there are different representations for integers and floating point numbers, we will look at the integer conversions among different numbering systems in this section.
2.1 Base numbers
In our daily life, we only deal with decimal numbers.  For convenience the base number is always ignored such that 5472.26 means 5472.2610.  However, in computer world, the representation 5472.26 can be a value in other numbering systems.  Therefore, we usually use the base number to indicate the different numbering systems such as 5472.268 in octal system and 5472.2616 in hexadecimal system.
According to the positional significance nature, 5472.268 equals to
5  83 + 4  82 + 7  81 + 2  80 + 2  8-1 + 6  8-2
=	2560 + 256 + 56 + 2 + 0.25 + 0.09375
=	2874.3437510
and 5472.2616 equals to 
5  163 + 4  162 + 7  161 + 2  160 + 2  16-1 + 6  16-2
=	20480 + 1024 + 112 + 2 + 0.125 + 0.0234375
=	21618.148437510
Obviously, the representation 5472.26 in different systems carries different values.  Therefore, when dealing with numeric values in different systems, the number indicating the base must also be present.  In addition, the representations for integers and floating point numbers are different.

2.2 Number Conversions
Conversion to decimal numbers
To convert a number from one base to decimal number is rather simple.  Because of the nature of the positional significance, the equivalent decimal number can be obtained using the polynomial expression stated in Exp. 1.1.  Consider the following examples:
	
Example 1.1

110010012 	= 	127 + 126 + 025 + 024 + 123 + 022 + 021 + 120
		= 	128 + 64 + 8 + 1
		= 	20110
Example 1.2

13078		= 	183 + 382 + 081 + 780
		= 	512 + 192 + 0 + 7
		= 	71110
Example 1.3

A1D16		= 	10162 + 1161 + 13160
		= 	2560 + 16 + 13
		= 	258910
	
	In each of the above examples, the number of other bases is expressed in the polynomial according to the positional significance.  By evaluating the polynomials, the equivalent decimal numbers can be obtained.
Conversion from decimal numbers
Given a decimal number, N10, its equivalent representation in base b is as 
Si Si-1 ... ... S2 S1 S0
Each of the symbol, Si, is a symbol in the numbering system.  From Exp. 1.1, we have:
N10	=	Si bi + Si-1 bi-1 + ... ... + S2 b2 + S1 b1 + S0 b0
Rearrange terms and note that b0 = 1, we have:
	=	
		=	Si bi-1 + Si-1 bi-2 + ... ... + S2 b1 + S1 b0
			(Exp. 1.2)
Exp. 1.2 shows that (N10 - S0) is divisible by b.  In other words, if we divide the number, N10, by the base, b, the LSD, S0, is the remainder of the division while the quotient is another number, N’10 such that
N’10	=	Si bi-1 + Si-1 bi-2 + ... ... + S2 b1 + S1 b0
			(Exp. 1.3)
Rearranging the expression Exp. 1.3 again and note that b0 = 1, we have:
	=	
		=	Si bi-2 + Si-1 bi-3 + ... ... + S2 b0
To find the next digit in base b, the above expression suggests that further division of the quotient, N’10, by the base number, b is required.  Repetition of the process leads us to find all the digits of the number in base, b.
We can follow the steps below to find the equivalent number of a decimal in any other bases:
i.	Divide the decimal number by the base number and obtain the quotient and the remainder.  The remainders are always less than the base number, e.g. the remainder is less than 2, i.e. 0 or 1, for base 2.
ii.	Take away the remainder and regard the quotient as the new decimal number.
iii.	Repeat the steps 1 and 2 until the quotient is 0.
iv.	The equivalent number in base b is obtained by writing the remainder in reverse sequence, i.e. regarding the last remainder as the MSD and the first remainder as the LSD.
To obtain the binary equivalent, use 2 as the base, b, in division.  To find the octal and hexadecimal equivalent numbers, the base number will be 8 and 16 respectively.  In all cases, the remainders will always be less than the base numbers.
	
Example 1.4
Convert the decimal number 39410 into its binary, octal, and hexadecimal equivalent numbers.
Solution:
	Remainder		Remainder		Remainder	
2	394			8	394			16	394			
2	197	0		8	49	2		16	24		10 (A)	
2	98	1		8	6	1		16	1		8	
2	49	0			0	6			0		1	
2	24	1										
2	12	0										
2	6	0										
2	3	0										
2	1	1										
	0	1										
The equivalent binary, octal, and hexadecimal numbers are 1100010102, 6128, and 18A16 respectively.
	
Conversions among binary, octal, and hexadecimal numbers

Octal	Binary		Hexadecimal	Binary	Hexadecimal	Binary	
0	000		0	0000	8	1000	
1	001		1	0001	9	1001	
2	010		2	0010	A	1010	
3	011		3	0011	B	1011	
4	100		4	0100	C	1100	
5	101		5	0101	D	1101	
6	110		6	0110	E	1110	
7	111		7	0111	F	1111	
Table 1.1 conversion table for binary, octal and hexadecimal numbers.
Remember that computers do not use octal and hexadecimal numbers to calculate.  Their existence are solely devoted for the convenience of the human users.  Conversions between binary and octal numbers and between binary and hexadecimal numbers are rather easy.  Consider the Table 1.1.
In Table 1.1, we can see that each octal digit comprises three binary digits and each hexadecimal digit comprises four binary digits.  Conversion to a binary number from an octal or hexadecimal number is simply replacing all octal or hexadecimal digits by their binary equivalents.  Consider the following examples.
	
Example 1.5
Convert the octal number 6128 to its binary equivalent.
Solution:
6		1		2	
					
110		001		010	
The binary equivalent is 1100010102.
Example 1.6
Convert the hexadecimal number 18A16 to its binary equivalent.
Solution:
1		8		A	
					
0001		1000		1010	
The binary equivalent is 0001100010102.
	
To convert a binary number to octal or hexadecimal number, it requires to group the binary digits into groups of three or four respectively.  Then replace each group with their octal or hexadecimal equivalent digits.  The grouping of binary digit must start from the radix point, towards left for the integral part.  Leading zeros can be added in case that there is not enough digits to form a group.
	
Example 1.7
Convert the binary number 101010110010112 to its octal and hexadecimal equivalents.
Solution:
Leading zero						
									
010		101		011		001		011	
									
2		5		3		1		3	

Leading zeros						
									
0010		1010		1100		1011	
							
2		A		C		B	
	The octal equivalent of 101010110010112 is 253138 and the hexadecimal equivalent is 2ACB16.

There is no direct method to convert an octal number to hexadecimal equivalent or vice versa.  The simplest method is to convert a number of one base to its binary equivalent followed by a conversion from the binary number to the equivalent of another base.

Example 1.8
Convert the octal number 6128 to its hexadecimal equivalent.
Solution:
6		1		2	
					
110		001		010	
					
1 1000 1010	
	
0001		1000		1010	
					
1		8		A	
The hexadecimal equivalent is 18A16.
Example 1.9
Convert the hexadecimal number 18A16 to its octal equivalent.
Solution:
1		8		A	
					
0001		1000		1010	
					
000 110 001 010	
					
110		001		010	
					
6		1		2	
The octal equivalent is 6128.  (Note that we can omit the leading zeroes in the binary number.)
	
3. Binary Arithmetic
Because there are only two symbols in binary numbering system, the binary arithmetic are rather simple.  Table 1.2 summarizes the rules of four arithmetic.
The rules are simple.  They are similar to the decimal arithmetic.  The addition operation is the up-counting process, i.e. zero counting one up gets one while the subtraction operation is the down-counting process.  The borrow and carry conditions are same as the decimal arithmetic.

	0			0			1			1	
+	0		+	1		+	0		+	1	
	0			1			1		1	0	
								
carry			
A. Addition.		
		borrow
 									
	0		1	0			1			1	
-	0		-	1		-	0		-	1	
	0			1			1			0	
											
B. Subtraction.		
	0			0			1			1	
x	0		x	1		x	0		x	1	
	0			0			0			1	
											
C. Multiplication.		
				0						1	
				1						1	
				0						1	
		
D. Division.		
Table 1.2. Binary arithmetic rules.
Again, multiplication and division operations for binary numbers are same as that of the decimal numbers.
	
Example 1.10
Use binary arithmetic, find the answers of the followings:
i.	11101010 + 00110111
Solution:
		1	1	1	0	1	0	1	0	
+		0	0	1	1	0	1	1	1	
	1	0	0	1	0	0	0	0	1	
Answer:	11101010 + 00110111 = 100100001
ii.	11101010 - 00110111
Solution:
		1	1	1	0	1	0	1	0	
-		0	0	1	1	0	1	1	1	
		1	0	1	1	0	0	1	1	
Answer:	11101010 - 00110111 = 10110011
iii.	10101011  1011
Solution:
				1	0	1	0	1	0	1	1	
								1	0	1	1	
				1	0	1	0	1	0	1	1	
			1	0	1	0	1	0	1	1		
		0	0	0	0	0	0	0	0			
	1	0	1	0	1	0	1	1				
	1	1	1	0	1	0	1	1	0	0	1	
Answer:	10101011  1011 = 11101011001
iv.	111100001  1101
Solution:
							1	0	0	1	0	1	
1	1	0	1	1	1	1	1	0	0	0	0	1	
				1	1	0	1						
				0	0	1	0	0					
					0	0	0	0					
					0	1	0	0	0				
						0	0	0	0				
						1	0	0	0	0			
							1	1	0	1			
							0	0	1	1	0		
								0	0	0	0		
									1	1	0	1	
									1	1	0	1	
												0	
Answer:	111100001  1101 = 100101
	
	In fact, multiplication and division employ the principles of addition and subtraction respectively.  Moreover, subtraction can be regarded as addition by adding a negative number.  In summary, all arithmetic problems can be solved using the principles of addition provided that negative numbers can be represented properly.
4. Negative numbers
There are two ways to represent a negative binary number.  Firstly, a signed bit is used to represent the positive or negative sign.  Secondly, the complemented form of the positive number is used to represent a negative value.
4.1 Sign bit representation
In decimal numbering system, a negative number is usually represented by a sign preceding its absolute value.  For example, the negative sixty-five is represented by -65.  It is quite obvious that the same technique can be employed to represent a negative binary number.  However, representation of the sign in a digital machine is rather complicated.
As mentioned before, a binary number, in a digital machine, is represented by a series of bi-stable elements.  Because a bi-stable element can only represent either 0 or 1, there is no way for them to represent a sign for negative numbers.  In other words, the sign must also be present in a form of either 0 or 1.  Therefore, the simplest way is to attach one digit to the binary number to represent the sign. With this reason, we usually refer this binary digit as the sign bit.
A binary number employing a sign bit is called a signed number.  The sign bit is always placed in the leftmost position of a number.  The number is positive if the sign bit is 0 and is negative if the sign bit is 1.  For example, 001012 represents +01012, or +510, while 101012 means -01012, or -510.
The advantage of using the sign bit is its simplicity.  However, there are two major disadvantages in the sign bit representation.  Consider an eight-bit signed number, it consists of one sign bit plus seven significant bits.  The largest positive number that it can represent is 01111111 or +12710 and the largest negative number is 11111111 or -12710.  The number range that an eight-bit signed number can represent is from -12710 to 0 to +12710, or total 255 numbers.
Of an eight-bit number, there are 256 different combinations.  Which number is missing?  Having investigated on the signed numbers, one can notice that the number zero is represented by both 00000000 and 10000000, i.e. +0 and -0.  The redundancy of the zero value is one of the disadvantages.  In general, an n-bit signed number can only represent a total of (2n -1) different values.
The second disadvantage shows during the negative number is manipulated.  Consider the following decimal subtraction operation:
93 - 65
which can be expressed as:
+93 + (-65) = +28
In other words, a subtraction can be thought of an addition to a negative number.    However, the sign bit representation only allows the binary subtraction.  Consider the following example:

+	1011101	(+93)			01011101	(+93)	
-	1000001	(-65)		+	11000001	(-65)	
	0011100	(+28)		1	00011110	(+30)	
				
Overflow			
Results show that addition to a signed negative number gives an incorrect answer.
4.2 Complement representation
The lack of flexibility in subtraction makes the sign bit representation less popular.  The complement representation overcomes this restriction.  It allows the binary subtraction to be performed by additions.
There are two types of complement for binary system.  The 1’s complement and the 2’s complement.  In the complement representations, the most significant bit still represents the sign.  However, the other digits are not the same as its positive counterpart.
4.2.1 1’s complement
The negative value of an n-digit binary number, N2, can be represented by its 1’s complement, N'2, which is equal to the base number, 2, to the power n minus the number N minus one, or:
N'2 	= 2n - N2 - 1
		= (2n - 1) - N2
Since (2n - 1) is the largest value that can be represented by an n-digit number in the binary numbering system, N'2 can be obtained by subtracting each digit with 1, or by inverting all binary digits.
	
Example 1.11
Find the 1's complement number of 010011012.
Solution:
There are eight digits, therefore, n = 8.

N'2	= (28 - 1) - N2
	= (100000000 - 1) - 01001101
	= 11111111 - 01001101
	= 101100102
Answer: 	The 1's complement of 010011012 is 101100102.
	
4.2.2 Subtraction with 1’s complements
As stated before, the complement representation allows us to perform subtraction with addition operations.  Consider a subtraction of two binary numbers:
	X2 - Y2
which can be expressed as:
	X2 + (- Y2)
If we use 1’s complement to represent -Y2, we have:
	X2 + (2n - 1 - Y2)	(Exp. 1.4)
If the value of X2 is greater than Y2, the answer obtained in Exp. 1.4 will become:
	(X2 - Y2  - 1) + 2n	(Exp. 1.5)
If we add 1 to the expression Exp. 1.5, it becomes:
	(X2 - Y2 ) + 2n
which is the difference between X2 and Y2 with an end-carry 2n.
However, if the value of X2 is less than Y2, the answer obtained in Exp. 1.4 will become:
	2n - (Y2  - X2) - 1	(Exp. 1.6)
which is the 1’s complement of the difference between X2 and Y2 and is negative.  Taking the 1’s complement on the expression Exp. 1.6 gives the correct answer.
	
Example 1.12
Find the answers of (93 -65) and (65 - 93) using 1’s complement method.
Solution:
+93	= 	010111012
+65	=	010000012
-93	= 	11111111 - 01011101 = 10100010	(in 1’s complement)
-65	= 	11111111 - 01000001 = 10111110	(in 1’s complement)

93 - 65		65 - 93	
	01011101	(+93)	(X)			01000001	(+65)	(X)	
+	10111110	(-65)	(28 -Y-1)		+	10100010	(-93)	(-Y)	
1	00011011	(+27)	(X-Y-1)			11100011	(-ve)		

Overflow (28)				
28-(Y-X)-1	
+	1					11111111	28 - 1	
	00011100	(+28)	(X-Y)		-	11100011	28-(Y-X)-1	
				00011100	-(Y-X)	
						
			(X-Y) = - 000111002 = -28	
	
Note that the major criterion on the successful operation is that the minuend and subtrahend must be of same number of digits.
Although 1’s complement representation allows us to perform subtraction using addition operations, there is a disadvantage of the 1’s complement representation which is the duplication in the representation of number zero.  Taking the 8-digit numbers as examples, the zero can be represented by 00000000 and 11111111. The range of the 8-bit 1's complement numbers is from 10000000 (-127) to 01111111 (+127). For this reason, the 1's complement representation is not common in most digital machines.
4.2.3 2’s complement
The 2’s complement, N"2, of an n-digit binary number, N2, is defined as:
N"2 	= 2n - N2
	= (2n - 1) - N2 + 1
		= N’2 + 1
where N’2 is the 1’s complement representation of the number.
The 2’s complement representation overcomes the weakness in the 1’s complement.  There is no duplicate representation for all numbers.  Let us consider the number zero in an 8-bit binary number:
N2	=	00000000
N’2	=	11111111
N”2	=	N’2 + 1		= 	1 00000000
Since only 8 bits are used, the base complement of zero is zero, too.  With 8-bit 2's complement representation, there are total 256 numbers ranging from 100000002       (-12810) to 000000002 (010) to 011111112 (+12710).
	
Example 1.13
Find the 2's complement number of 01001101.
Solution:
From example 1.11, the 1’s complement of 01001101, N' is 10110010
	N” 	= N’ + 1
		= 10110010 + 1 
		= 10110011
Answer: The 2’s complement of 01001101 is 10110011.	
4.2.4 Subtraction with 2’s complements
Using 2’s complement representation, the operation of subtraction can be performed by addition, too.  Again, the major criterion on the successful operation is that the minuend and subtrahend must be of same number of digits.
Similar to base-1 complement representation, the subtraction of two numbers:
	X2 - Y2
can be arranged as
	X2 + (- Y2)
which can be expressed as, in base complement representation:
	X2 + (2n - Y2) = X2 - Y2 + 2n
If X is greater than Y, the sum will produce an end carry, 2n, which can be discarded, and the sum is positive.
If X is smaller than Y, the sum is negative and will be 2n - (Y2 - X2), which is the base complement of (Y2 - X2).  The base complement of the sum will be (Y2 - X2) which is a positive number.  Placing a negative sign before (Y2 - X2) will be the sum.
	
Example 1.14
Find the answers of (93 -65) and (65 - 93) using 2’s complement method.
Solution:
+93	= 	010111012
+65	=	010000012
-93	= 	100000000-01011101 = 10100011	(in 2’s complement)
-65	= 	100000000-01000001 = 10111111	(in 2’s complement)

93 - 65		65 – 93	
	01011101	(+93)	(X)			01000001	(+65)	(X)	
-	10111111	(-65)	(28 -Y)		+	10100011	(-93)	(-Y)	
1	00011100	(+28)	(X-Y)			11101000	(-ve)		

Overflow (28)				
28-(Y-X)	
				100000000	28	
			-	11100011	28-(Y-X)	
				00011100	-(Y-X)	
						
					(X-Y) = - 000111002 = -28