Monday, October 11 Assignment(s) due: Assignment #7: IEEE FLOATING POINT FORMATS EMULATOR PROGRESS WORKSHEET 1 Quiz(zes) due: Quiz #7: Debug Note: Quiz #8: Floating Point Formats is due next Monday Tonight is the cutoff date for Assignment #5 (Complement Arithmetic) Next Monday is the cutoff date for all Debug and Floating Point assignments and quizzes(these topics will be covered on the midterm) Any assignments turned in to me by Thursday afternoon will be available in the lab on Monday afternoon Please note: The midterm is next Monday (at the beginning of class) - an 8.5 in. * 11 in. cheat sheet will be allowed We will review for the midterm tonight
110
Embed
Monday, October 11 Assignment(s) due:Assignment #7: IEEE FLOATING POINT FORMATS
Monday, October 11 Assignment(s) due:Assignment #7: IEEE FLOATING POINT FORMATS EMULATOR PROGRESS WORKSHEET 1 Quiz(zes) due:Quiz #7: Debug Note:Quiz #8: Floating Point Formats is due next Monday Tonight is the cutoff date for Assignment #5 (Complement Arithmetic) - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Trace through the program above and indicate below the contents of the registers and memory location just before the INT 20 instruction is executed.
AX = BX = CX =
The number 1.27510 = ? 2
a) 1.010001
b) 1.01
c) 1.1001101
d) 1.1
If the number 1.010001 normalized using the IEEE standard (using radix 2 to normalize, radix point to the right of the most significant bit, and the most significant bit being hidden) it will result in whichfraction and exponent?
a) .1010001 and 1
b) .1010001 and 0
c) .010001 and 1
d) .010001 and 0
For the binary number 1 10000101 01010001000000000000000:
Using excess-127, what is the exponent in base 10?
1. -6
2. 0
3. 4
4. 6
For the binary number 1 10000101 01010001000000000000000:
With an exponent of 6 and using radix 2, what is the binary normalized form?
1. -.010100001 * (26)10
2. -.010100000101 * (2-6)10
3. -1.01010001 * (26)10
4. -1.101010001 * (26)10
If the binary normalized form is -1.01010001 * (26)10: The number in binary is:
1. -1010100.01
2. -101010001.1
3. -101010001
4. -.00000101010001
If the binary number is -1010100.01: The number in decimal is:
1. -168.25
2. -84.25
3. -84.5
4. -168.1
Vocabulary:
address DS (data segment)
ASCII code IP (instruction pointer)
bit LOOP instruction
byte memory
compilation/translation register
Noise and Distortion:
-occurs every time a signal is transmittted
- may be random
- white noise (a background hiss)
- impulse noise (amplitude peaks that block out data)
- external, usually from equipment
- internal, signal from another channel
- echoes on the line
- amplitude changes
- circuit failures
Transmission in the presence of noise:
Error Detection
- error-detecting Codes
- add redundant bits to each unit of data
- receiver knows when an error has occurred
- receiver can ask for retransmission
- to detect single-bit errors
- often used with 7-bit ASCII code characters
- add one parity bit so number of 1-bits in the word is always even (even parity) or odd (odd parity)
- works about 70% of the time
- e.g. to transmit the character ‘A’ (6510 => 4116 => 10000012)
1 0 10 0 0 0
- to detect single-bit errors
- often used with 7-bit ASCII code characters
- add one parity bit so number of 1-bits in the word is always even (even parity) or odd (odd parity)
- works about 70% of the time
- e.g. to transmit the character ‘A’ (6510 => 4116 => 10000012)
- using odd parity:
1 0 10 0 0 0
1 0 10 0 0 01
- to detect single-bit errors
- often used with 7-bit ASCII code characters
- add one parity bit so number of 1-bits in the word is always even (even parity) or odd (odd parity)
- works about 70% of the time
- e.g. to transmit the character ‘A’ (6510 => 4116 => 10000012)
- using odd parity:
- using even parity:
1 0 10 0 0 0
1 0 10 0 0 0
1 0 10 0 0 0
1
0
Error Detection and Correction
- error-correcting Codes
- add more redundant bits to each unit of data
- receiver can detect and sometimes correct the error
-Hamming Codes
- use a “block parity” method of adding parity bits
- use more than 1 parity bit
- allow for detection and correction of single-bit errors
- Hamming algorithm:
- start numbering the bits at 1 (from the left)
bit 1 bit 2 bit 3 bit 4 bit 5
- Hamming algorithm:
- start numbering the bits at 1 (from the left)
- all bits whose position is a power of 2 are parity bits
- i.e. bits 1, 2, 4, 8, 16 etc.
parity bit
bit 1 bit 2 bit 3 bit 4 bit 5
parity bit
parity bit
- Hamming algorithm:
- start numbering the bits at 1 (from the left)
- all bits whose position is a power of 2 are parity bits
- i.e. bits 1, 2, 4, 8, 16 etc.
- then fill in the data bits
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- Hamming algorithm:
- start numbering the bits at 1 (from the left)
- all bits whose position is a power of 2 are parity bits
- i.e. bits 1, 2, 4, 8, 16 etc.
- then fill in the data bits
- so a code with 2 data bits
- would require:
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- Hamming algorithm continued:
- each data bit is checked by those parity bits before it whose bit positions add up to its position
- data bit 3 is checked by parity bit 1 and parity bit 2
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- Hamming algorithm continued:
- each data bit is checked by those parity bits before it whose bit positions add up to its position
- data bit 3 is checked by parity bit 1 and parity bit 2
- data bit 5 is checked by parity bit 1 and parity bit 4
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- Hamming algorithm continued:
- or - parity bit 1 checks data bits 3 and 5
- parity bit 2 checks data bit 3
- parity bit 4 checks data bit 5
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- Hamming algorithm continued:
- each parity bit forms a group of itself and the data bits it checks
- 3 groups are formed
- there will be an overlap of data bits
- each group must add up to an even number of 1’s (or none) for even parity
- or an odd number of 1’s for odd parity
- groups:
- bits 1, 3 and 5
- bits 2 and 3
- bits 4 and 5
- each group contains only 1 parity bit
- groups:
Group 1: bit 1
Group 2: bit 2
Group 3: bit 4
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- each group contains only 1 parity bit
- groups:
Group 1: bit 1
Group 2: bit 2
Group 3: bit 4
- data bit 3 is checked by parity bit 1 and parity bit 2- (1 + 2 = 3 or 3 = 1 + 2)
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- each group contains only 1 parity bit
- groups:
Group 1: bit 1 bit 3
Group 2: bit 2 bit 3
Group 3: bit 4
- data bit 3 is checked by parity bit 1 and parity bit 2- (1 + 2 = 3 or 3 = 1 + 2)
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- each group contains only 1 parity bit
- groups:
Group 1: bit 1 bit 3
Group 2: bit 2 bit 3
Group 3: bit 4
- data bit 3 is checked by parity bit 1 and parity bit 2- (1 + 2 = 3 or 3 = 1 + 2)
- data bit 5 is checked by parity bit 1 and parity bit 4- (1 + 4 = 5 or 5 = 1 + 4)
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
- each group contains only 1 parity bit
- groups:
Group 1: bit 1 bit 3 bit 5
Group 2: bit 2 bit 3
Group 3: bit 4 bit 5
- data bit 3 is checked by parity bit 1 and parity bit 2- (1 + 2 = 3 or 3 = 1 + 2)
- data bit 5 is checked by parity bit 1 and parity bit 4- (1 + 4 = 5 or 5 = 1 + 4)
parity bit
data bit
bit 1 bit 2 bit 3 bit 4 bit 5
data bit
parity bit
parity bit
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
1
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
1 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
1 0 1
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
1 0 1
1 1 0
Legal codewords for the 2-data-bit Hamming code (even parity):
0
1
1
0
0
0
P1 P4P2 D3 D5
P1
P1
P1
P2
P2
P2
P4
P4
P4
D3
D3
D3
D5
D5
D5
1 1
Parity Bit Data Bits P1 D3, D5 P2 D3 P4 D5
0 0 0
1 0 1
1 1 0
110
Legal codewords for the 2-data-bit Hamming code (even parity):
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a parity bit
- the receiver checks the groups:
10P1 P2 P4D3 D5
01 1
10P1 P2 P4D3 D5
11 1
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a parity bit
- the receiver checks the groups: p1, d3, d5 ok
10P1 P2 P4D3 D5
01 1
10P1 P2 P4D3 D5
11 1
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a parity bit
- the receiver checks the groups: p1, d3, d5 okp2, d3 no
10P1 P2 P4D3 D5
01 1
10P1 P2 P4D3 D5
11 1
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a parity bit
- the receiver checks the groups: p1, d3, d5 okp2, d3 nop4, d5 ok
10P1 P2 P4D3 D5
01 1
10P1 P2 P4D3 D5
11 1
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a parity bit
- the receiver checks the groups: p1, d3, d5 okp2, d3 nop4, d5 ok
- only one group is wrong- the error is in the parity bit for that group
10P1 P2 P4D3 D5
01 1
10P1 P2 P4D3 D5
11 1
- to transmit the data number 01
- we use the Hamming code word
- if we transmit
- there is an error in a data bit
- the receiver checks the groups: p1, d3, d5 nop2, d3 nop4, d5 ok
- two groups are wrong- the error is in the common bit
10P1 P2 P4D3 D5
01 1
11P1 P2 P4D3 D5
01 1
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1,p2,p4,p8,
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1, 3p2, 3p4p8
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1, 3, 5p2, 3p4, 5p8
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1, 3, 5p2, 3, 6p4, 5, 6p8
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1, 3, 5, 7p2, 3, 6, 7p4, 5, 6, 7p8
7-bit character ‘A’ using the Hamming code and odd parity:
- 6510 => 4116 => 10000012
10P1 P2 P4 P8 3 5 6 7 9 10 11
00 0 01
groups: p1, 3, 5, 7, 9p2, 3, 6, 7p4, 5, 6, 7p8, 9
7-bit character ‘A’ using the Hamming code and odd parity: