The 1's complement is formed by inverting every binary digit (bit) of the number - if it is a 0 it becomes a 1, otherwise it is a 1 and becomes a 0. If 10 is in base 2, then its 1's compliment is 01 or just 1. If 10 is in base 10, then in binary it is 1010 and its 1's complement is 0101 = 5 in decimal. However, if more bits are being used to store it, there would be leading 0s that get inverted to 1s and so the resultant number is different; examples: 8 bits (a byte): decimal 10 = 0000 1010 → 1111 0101 = 245 in decimal 16 bits: decimal 10 = 0000 0000 0000 1010 → 1111 1111 1111 0101 = 65525 Next, if 2s complement is being used to represent negative numbers, the binary 1111 0101 represents decimal -11; similarly 1111 1111 1111 0101 represents decimal -11.
11001
m
It is simplest to convert each hexadecimal digit into its 4-digit binary equivalent. So: 5 = 0101 A = 1010 3 = 0011 4 = 0100 F = 1111 6 = 0101 So, the binary equivalent is 10110100011010011110101.
1001 0101
What is the product of the binary numbers 0101 and 0101?
The 1's complement is formed by inverting every binary digit (bit) of the number - if it is a 0 it becomes a 1, otherwise it is a 1 and becomes a 0. If 10 is in base 2, then its 1's compliment is 01 or just 1. If 10 is in base 10, then in binary it is 1010 and its 1's complement is 0101 = 5 in decimal. However, if more bits are being used to store it, there would be leading 0s that get inverted to 1s and so the resultant number is different; examples: 8 bits (a byte): decimal 10 = 0000 1010 → 1111 0101 = 245 in decimal 16 bits: decimal 10 = 0000 0000 0000 1010 → 1111 1111 1111 0101 = 65525 Next, if 2s complement is being used to represent negative numbers, the binary 1111 0101 represents decimal -11; similarly 1111 1111 1111 0101 represents decimal -11.
The 8086 forms a 20 bit address by adding the effective address (a 16 bit value) to a segment register (another 16 bit value) which is left shifted by 4. That gives a 20 bit address in the range of 00000H to FFFFFH. cs register holds the base address (16 bit) and the IP has the offset. (ex): CS --->348A IP --->4214(offset) generation of 20 bit: CS*10+IP (ie) 348A0 04214 + ---------------------- 38AB4(20 BIT) ----------------------
I assume you mean BCD, Binary Coded Decimal. BCD uses 4 bits to represent one decimal number. The easiest way is to make a table, with decimal, BCD, Hex and straight binary. 1 0000 0001 1 0000 0001 2 0000 0010 2 0000 0010 3 0000 0011 3 0000 0011 ...Skip a bit.... 9 0000 1001 9 0000 1001 10 0001 0000 A 0000 1010 11 0001 0001 B 0000 1011 ...Skipping again.... 15 0001 0101 F 0000 1111 16 0001 0110 10 0001 0000 Get the idea? In the first one, 4 binary bits are matched with one decimal digit. In straight binary, the number scrolls on. Interestingly, this caused some problems, earning itself the name 'the 2.1K bug'. some systems, generally small systems like Eftpos terminals, wrote values in BCD binary, but read them as straight binary. So dates were written in BCD 10, but read back as (check the table) Ordinary binary 16. Hilarity ensued.
in EBCDIC: 11001000, 10000101, 10010011, 10010011 10010110 in ASCII: 1001000, 1100101, 1101100, 1101100, 1101111 in Unicode: 0000 0000 0100 1000, 0000 0000 0110 0101, 0000 0000 0110 1100, 0000 0000 0110 1100, 0000 0000 0110 1111
11001
11001
Alright, let's forget the - for a while convert 5 to binary. do this: 5/2=2.5 2/2=1 1/2=0,5 than this: 2.5 absolute value=2 1 absolute value=1 0,5 absolute value=0 finally this 2*2=4 and 5-4=1 2*1=2 and 2-2=0 2*0=0 and 1-0=1 <--(last digit) = 101 complete the binary number by placing a 0= 0101. Now as you might know HW = 2 bytes and 1 byte is 8 bits so to to complete you should place 0000 0000 0000 before your result: 0000 0000 0000 0101 Let's not forget about the - though... you'll have to invert your result 0000 0000 0000 0101= 1111 1111 1111 1010 and increment it by 1=1111 1111 1111 1011 and there is your result... You could check your result this way: 0000 0000 0000 0101 +1111 1111 1111 1011 1 0000 0000 0000 0000 The first bit defines if your decimal has a + or - (1=- and 0=+) The rest is simple... (1111=F) (1111=F) (1111=F) (1011=B)=FFFB (hex HW)
m
The Alphabet in Binary CodeLetterBinary CodeA01000001B01000010C01000011D01000100E01000101F01000110G01000111H01001000I01001001J01001010K01001011L01001100M01001101N01001110O01001111P01010000Q01010001R01010010S01010011T01010100U01010101V01010110W01010111X01011000Y01011001Z01011010LetterBinary Codea01100001b01100010c01100011d01100100e01100101f01100110g01100111h01101000i01101001j01101010k01101011l01101100m01101101n01101110o01101111p01110000q01110001r01110010s01110011t01110100u01110101v01110110w01110111x01111000y01111001z01111010
A 0, 1 system using: 5, 2, 1', 1 instead of 8, 4, 2, 1 to count binary numbers. Example: 0000 0001 0010 0101 0100 0101 1001 1100 1101 1111
It is simplest to convert each hexadecimal digit into its 4-digit binary equivalent. So: 5 = 0101 A = 1010 3 = 0011 4 = 0100 F = 1111 6 = 0101 So, the binary equivalent is 10110100011010011110101.