chapter 2epaper.gotop.com.tw/pdf/aee005600.pdf · chapter sydney smith(1835) 2 2.1 ......

62
CHAPTER Sydney Smith(1835) 2 2.1 (bit) bit bi nary digit ( ) 1964 IBM System/360 8 8 (byte) (words) (word size) 16 32 64 ( )

Upload: phungnhan

Post on 29-Apr-2018

222 views

Category:

Documents


2 download

TRANSCRIPT

CHAPTER

Sydney Smith(1835)

2

2.1

(bit) bit binary digit

( ) 1964 IBM System/360

8

8 (byte)

(words)

(word

size) 16 32

64 ( )

(nibbles nybles)

(positional number sys-tem)

(least-value) (low-

order) (high-order)

2.2 (POSITIONAL NUMBER SYSTEM)

( (base)10)

243

1 10

(radix ) (weighted

numbering system)

0 9 3 ( 3)

0 1 2

9 8

3310 33(

)

( 2.1)

2.1

243.5110 = 2 � 102 + 4 � 101 + 3 � 100 + 5 � 10�1 + 1 � 10�2

2123 = 2 � 32 + 1 � 31 + 2 � 30 = 2310

101102 = 1 � 24 + 0 � 23 + 1 � 22 + 1 � 21 + 0 � 20 = 2210

( 2)

( 16) ( 8) 0 1

0 7 0 9 A B C D E F

10 15 2.1

2.3

Gottfried Leibniz(1646-1716)

Leibniz

(0) (1) 1940

( 2.1 )

2.3.1

( )

2.1

-

10410 3 34=81

3 104 5

( 0 4) 81 104

23 33 = 27 23

23 32 = 9 23-18 = 5 5

31 = 3 2 2 30 2.2

2.2 10410 3

104�81 = 34 � 1

23

�0 = 33 � 023

�18 = 32 � 25

�3 = 31 � 12

�2 = 30 � 20 10410 = 102123

- -

2.3

2.3 - 10410 3

3 104 104 3 34 23 34 34 3 11 13 11 11 3 3 23 3 3 3 1 0

1 1 3 0 10

10410 = 102123

2.4

2.4 14710

2 147 147 2 73 12 73 73 2 36 12 36 36 2 18 02 18 18 2 9 02 9 9 2 4 12 4 4 2 2 02 2 2 2 1 02 1 1 2 0 1

014710 = 100100112

N 0 2n-1 4

0 15 8 0

255

4

11112(1510) 11112 15 15 30 4

30 (overflow)

2.4

2.3.2

(radix points)

(decimal point)

2/3

0.23(2 3-1 = 2 1/3)

-

2.5 5

2.5 0.430410 5

0.4304� 0.4000 = 5�1 � 2

0.0304� 0.0000 = 5�2 � 0

0.0304� 0.0240 = 5�3 � 3

0.0064� 0.0064 = 5�4 � 4

0.0000

0.430410 = 0.20345

-

2.6

2.6 0.430410 5

.4304� 52.1520 2

.1520� 50.7600 0

.7600� 53.8000 3

.8000� 54.0000

0.430410 = 0.20345

(rounding algorithm)

( )

2.7

2.7 0.3437510 2 4

.34375� 2

0.68750 ( ).68750� 2

1.37500.37500� 2

0.75000.75000� 2

1.50000 ( 4 )

0.3437510 = 0.01012

4 3( 2.8)

10

2

2.8 31214 3

31214 = 3 � 43 + 1 � 42 + 2 � 41 + 1 � 40

= 3 � 64 + 1 � 16 + 2 � 4 + 1 = 21710

3

3 | 217 13 | 72 03 | 24 03 | 8 23 | 2 2

0 31214 = 220013

2.3.3

( )

16=24 4 ( hextet)

8=23 3

( octet)

2.9 1100100111012

110 010 011 1016 2 3 5

1100100111012 = 62358

1100 1001 1101C 9 D

1100100111012 = C9D16

(

)

2.4

1

8

(signed magnitude)

(complements)

2.4.1

(signed integers)

(signed magnitude representation)

(

) ( )

8 1 10000001 +1 00000001

8 7

8 27 1 127(

)

127 N 2(N 1) 1 ~ 2(N 1)

1

(1)

(2)

( )

8

7

2.10 010011112 001000112

1 1 1 1 ⇐ 0 1 0 0 1 1 1 1 (79)0 + 0 1 0 0 0 1 1 + (35)0 1 1 1 0 0 1 0 (114)

010011112 + 001000112 = 011100102

( 2.11 )

(

)

Double-Dabble

double-dabble( double-dib-

ble)

( )

1

100100112

1

1 0 0 1 0 0 1 1

2

1 0 0 1 0 0 1 12

22

3

1 0 0 1 0 0 1 12 4

+ 02

� 2 � 22 4

4 3

1 0 0 1 0 0 1 12 4 8 18 36 72 146

+ 0 + 0 + 1 + 0 + 0 + 1 + 12 4 9 18 36 73 147‹ 100100112 = 14710

� 2 � 2 � 2 � 2 � 2 � 2 � 22 4 8 18 36 72 146

double-dabble ( )

2

02CA16

2.11 010011112 011000112

1 ← 1 1 1 1 ⇐

0 1 0 0 1 1 1 1 (79)

0 + 1 1 0 0 0 1 1 + (99)

0 0 1 1 0 0 1 0 (50)

79 + 99 = 50

(minuend)

2.12 011000112 010011112

0 1 1 2 ⇐ 0 1 1 0 0 0 1 1 (99)0 � 1 0 0 1 1 1 1 � (79)0 0 0 1 0 1 0 0 (20)

001000112 010011112 = 000101002

2.13 010011112(79) 011000112(99)

01100011 01000011

2.12 00101002

0 2 C A0000 0010 1100 1010

double-dabbl

1 0 1 1 0 0 1 0 1 02 4 10 22 44 88 178 356 714

+ 0 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 02 5 11 22 44 89 178 357 714

� 2 � 2 � 2 � 2 � 2 � 2 � 2 � 2 � 22 4 10 22 44 88 178 356 714

02CA16 = 10110010102 = 71410

( ) 010011112

011000112 = 100101002

(

)

(1)

(2)

( )

2.14 100100112( 19) 000011012( 13)

( ) 1 ( )

( )

0 1 2 ⇐1 0 0 1 0 0 1 1 (�19)0 � 0 0 0 1 1 0 1 + (13)1 0 0 0 0 1 1 0 (�6)

100100112 000011012 100001102

2.15 101010112( 43) 100110002( 24)

2 4 2 4

43 43 24

( 43 24)

( 43 24)

0 20 1– 0 1 0 1 1 (43)

� 0 0 1 1 0 0 0 � (24)0 0 1 0 0 1 1 (19)

101010112 000110002

100100112

( ) 10000000

00000000 ( ) ( )

2.4.2

(diminished radix complement) 167 52 = 115 999

52 947 167 52 = 167 947 = 114

167 52 = 115

9(casting out 9s)

700

700 300

001-500 501-999

997

3 997 501-999

001-500 (radix complements)( )

001-500

10 ( 9)

d

r N N (rd 1) N r

= 10 10 1 = 9 2468 9999 2468 =

7531 (2) 1 01012

11112 01012 = 10102

1

0 0 1

10 7 10 ( 7)

(

)

1

0 2.16

2.16 8 2310 910

2310 = + (000101112) = 000101112� 910 = �(000010012) = 111101102

23 9 (9)

(23) 9 23

1 0 ( (end

carry-arround) )

2.17 2310 910

1 ← 1 1 1 1 1 ⇐0 0 0 1 0 1 1 1 (23)

+ 1 1 1 1 0 1 1 0 + (–9)0 0 0 0 1 1 0 1

+ 10 0 0 0 1 1 1 0 1410

2.18 910 2310

0 ← 0 0 0 0 1 0 0 1 (9)+ 1 1 1 0 1 0 0 0 + (–23)

1 1 1 1 0 0 0 1 –1410

111100012 1410

( 1) 111100012

000011102 14

0 0 0 0 0 0 0 0

11111111

(radix complement) r d

N N rd N N 0 N = 0 0

103 2 = 998 ( )

4 00112 24 00112 = 100002

00112 = 11012

( )

2.19

2.19 8 2310 2310 910

2310 = + (000101112) = 000101112�2310 = � (000101112) = 111010002 + 1 = 111010012�910 = � (000010012) = 111101102 + 1 = 111101112

000101112

23

111101112

(

) 000010002 1 000010012

9 11110112

9

(

)

2.20 910 2310

0 0 0 0 1 0 0 1 (9)+ 1 1 1 0 1 0 0 1 + (–23)

1 1 1 1 0 0 1 0 –1410

111100102 1410

2.21 2310 910

1← 1 1 1 1 1 1 ⇐0 0 0 1 0 1 1 1 (23)

+ 1 1 1 1 0 1 1 1 + (–9)0 0 0 0 1 1 1 0 1410

2.21

( )

2.21

( )

( 1)

( )

( )

2.22 ( 1) ( 0)

2.22 12610 810

0← 1 1 1 1 ⇐0 1 1 1 1 1 1 0 (126)

+ 0 0 0 0 1 0 0 0 +(8)1 0 0 0 0 1 1 0 (–122???)

( )

( 0)

(self-invert)

7 7 8 7

(throughput)

( )

( ) (trial-and-error)

(divide underflow)

(floating-point units)

7

0

1 ( ) 01112

7 11112 11112 1(

1 ) 8

8 10002 1

(0111) 1( 1000 8)

8

2.5

16 32,767

000001102 000010112

0 0 0 0 0 1 1 0 +

+

+

+

=

0 0 0 0 1 1 0 0

0 0 0 1 1 0 0 0

0 0 1 1 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 1 1 0

0 0 0 1 0 0 1 0

0 0 0 1 0 0 1 0

0 1 0 0 0

1 0 1 1

1 0 1 1

1 0 1 1

1 0 1 1

0 1 0

32,767 32

16

(scientific notation)

(fractional

part) (mantissa)

mantissa

32,767 3.2767 104

2.5.1

(

2 ) (significand

)

( ) ( )

14 5 8

( 2.2) 2.5.2

2.2

17 17

17.0 100 1.7 101 0.17 102 1710 100012 20 1000.12

21 100.012 22 10.0012 23 1.00012 24 0.100012 25

0.100012 25 10001000 00101

00 0 1 0 1 1 0 0 0 1 0 0 0

14 (fixed-point)

( 14 )

65536 0.12 217

10 0 0 0 1 1 0 0 0 0 0 0 0

0.25 2-2 2

(biased exponent)

(bias value)

16 0 31

( 5 25 32 )

16 16

(excess-16) 16

0 1

( ) 0 1

17 1710 0.100012 25

16 5 21

10 0 1 0 1 1 0 0 0 1 0 0 0

0.25 0.1 2-1

00 1 1 1 1 1 0 0 0 0 0 0 0

10 0 1 0 1 1 0 0 0 1 0 0 0 =

10 0 1 1 0 0 1 0 0 0 1 0 0 =

10 0 1 1 1 0 0 1 0 0 0 1 0 =

10 1 0 0 0 0 0 0 1 0 0 0 1

1

(normalization) 1

2.23 -16 0.0312510

0.0312510 0.000012 20 0.0001 2-1 0.001 2-2 0.01 2-3 0.1

2-4 16 4 12

00 1 1 0 0 1 0 0 0 0 0 0 0

2.5.2

1.5 102

3.5 103

1.5 102 3.5 103 0.15 103 3.5 103 3.65

103

2.24 -16 14

10 0 0 1 0 1 1 0 0 1 0 0 0 +

10 0 0 0 0 1 0 0 1 1 0 1 0

11.001000+ 0.1001101011.10111010

10 0 0 1 0 1 1 1 0 1 1 1 0

2-3 24 21

2.25

10 0 0 1 0 1 1 0 0 1 0 0 0 = 0.11001000 � 22

= 0.10011010 � 20� 10 0 0 0 0 1 0 0 1 1 0 1 0

0.11001000 0.10011010 0.0111100001010000

22 20 22 1.1110000101

10 0 0 0 1 1 1 1 1 0 0 0 0

2.5.3

(real number)

(approximation)

(bla tant) (subt le)

(unnoticed) (overflow) (underflow)

.111111112 215 .11111111 215

2-19 2128 128.5

128.5

128.5 10000000.1

(significand)

128.5

128.5 � 128 = 0.00389105 � 0.39%128.5

2.3 14 16.24 0.91

8

100

14

2.5.4 IEEE-754

1980

1985 (Institute of

Electrical and Electronic Engineers IEEE)

IEEE-754(1985)

IEEE-754 8 127

23 32 255

( ) (not a number) ( )

N a N

2.3 14

(error indicator)

64 11 52

(bias) 1023 IEEE 2.4

NaN 2047

FPU 64

IEEE-754

0 1

IEEE-754

IBM

IBM

IEEE-754 1998 IBM 1964

System/360

2.6

2.4 IEEE-754

2.6.1

(Binary-coded decimal BCD) IBM

BCD

4 8

(zone) (digit)

(

)BCD

1111

1100 1101 2.5 BCD

1010 1111

40

0 .3 8

0 .296875 1.05

BCD 0.3 1111 0011( )

BCD

2.5 (BCD)

(packing)

(packed decimal number)

2.26 3 BCD 1265

1256 -

1111 0001 1111 0010 1111 1111 0101

0001 0010 0110 0101

(1101)

1111

0000 0001 0010 0110 0101 1101

2.6.2 EBDIC

IBM IBM System/360 6 BCD

System/360

IBM BCD 6 8

(Extended Binary Coded Decimal Interchange EBCDIC) IBM

EBCDIC 2.6 - EBCDIC

EBCDIC a 1000

0001 3 1111 0011

0000

NUL

DLE

DS

SP

&

{

}

\

0

Zone

0000

0001

0010

0011

0100

0101

0110

0111

1000

1001

1010

1011

1100

1101

1110

1111

0001

SOH

DC1

SOS

/

a

j

~

A

J

1

0010

STX

DC2

FS

SYN

b

k

s

B

K

S

2

0011

ETX

TM

c

l

t

C

L

T

3

0100

PF

RES

BYP

PN

d

m

u

D

M

U

4

0101

HT

NL

LF

RS

e

n

v

E

N

V

5

0110

LC

BS

ETB

UC

f

o

w

F

O

W

6

0111

DEL

IL

ESC

EOT

g

p

x

G

P

X

7

1000

CAN

h

q

y

H

Q

Y

8

1001

RLF

EM

'

i

r

z

I

R

Z

9

1010

SMM

CC

SM

[

]

|

:

1011

VT

CU1

CU2

CU3

.

$

,

#

1100

FF

IFS

DC4

<

*

%

@

1101

CR

IGS

ENQ

NAK

(

)

_

'

1110

SR

IRS

ACK

+

;

>

=

1111

SI

IUS

BEL

SUB

!

ˆ

?

"

Digit

NULSOHSTXETXPFHTLCDELRLFSMMVTFFCRSOSIDLEDC1DC2

NullStart of headingStart of textEnd of textPunch offHorizontal tabLowercaseDeleteReverse linefeedStart manual messageVertical tabForm FeedCarriage returnShift outShift inData link escapeDevice control 1Device control 2

TMRESNLBSILCANEMCCCU1IFSIGSIRSIUSDSSOSFSBYPLF

Tape markRestoreNew lineBackspaceIdleCancelEnd of mediumCursor ControlCustomer use 1Interchange file separatorInterchange group separatorInterchange record separatorInterchange unit separatorDigit selectStart of significanceField separatorBypassLine feed

ETBESCSMCU2ENQACKBELSYNPNRSUCEOTCU3DC4NAKSUBSP

End of transmission blockEscapeSet modeCustomer use 2EnquiryAcknowledgeRing the bell (beep)Synchronous idlePunch onRecord separatorUppercaseEnd of transmissionCustomer use 3Device control 4Negative acknowledgementSubstituteSpace

Abbreviations:

2.6 EBCDIC ( - )

2.6.3 ASCII

IBM System/360

(Ameri-

can Standard Code for Information Interchange ASCII)

ASCII 5

(Murray) 1880 Baudot 1960 5

(International Organization

for Standardization ISO) 7

5(International Alphabet Number 5) 1976

ASCII

2.7 ASCII 32 10 52

( ) 32 ( $ #) ( 8

)

(Parity)

( ) (1)

(0) 1

ASCII A 7

100 0001 1 0

0100 0001 ASCII C 100 0011

1 1100 0011 2.8

ASCII

1980

12810 25510

n ASCII

2.7 ASCII ( )

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

NUL

SOH

STX

ETX

EOT

ENQ

ACK

BEL

BS

TAB

LF

VT

FF

CR

SO

SI

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

DLE

DC1

DC2

DC3

DC4

NAK

SYN

ETB

CAN

EM

SUB

ESC

FS

GS

RS

US

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

!

"

#

$

%

&

'

(

)

*

+

,

-

.

/

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

0

1

2

3

4

5

6

7

8

9

:

;

<

=

>

?

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

@

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

P

Q

R

S

T

U

V

W

X

Y

Z

[

\

]

ˆ

_

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

`

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

p

q

r

s

t

u

v

w

x

y

z

{

|

}

~

DEL

NUL

SOH

STX

ETX

EOT

ENQ

ACK

BEL

BS

HT

LF

VT

FF

CR

SO

SI

Null

Start of heading

Start of text

End of text

End of transmission

Enquiry

Acknowledge

Bell (beep)

Backspace

Horizontal tab

Line feed, new line

Vertical tab

Form feed, new page

Carriage return

Shift out

Shift in

DLE

DC1

DC2

DC3

DC4

NAK

SYN

ETB

CAN

EM

SUB

ESC

FS

GS

RS

US

DEL

Data link escape

Device control 1

Device control 2

Device control 3

Device control 4

Negative acknowledge

Synchronous idle

End of transmission block

Cancel

End of medium

Substitute

Escape

File separator

Group separator

Record separator

Unit separator

Delete/Idle

Abbreviations:

2.6.4 (Unicode)

EBCDIC ASCII

1991

(Unicode)

(Unicode Consortium)

16 ASCII Latin 1

ISO/IEC 10646-1

16

2.8

´ A Á

Java

ASCII EBCDIC

2.7

ASCII EBCDIC (Unicode)

( )

( )

ASCII EBCDIC

( ) high( ) low( )

( f lux

reversal)

2.8

( ASCII)

(data encoding) (encoded data)

2.7.1 (Non-Return-to-Zero Code)

(NRZ Non-Return-to-Zero)

high low

3 5

3 5 ( )

OK ASCII 11001111 01001011

2.9 NRZ

(bit cells)

2.9 ASCIIO 1 OK

OKAY 0 1 11001111 01001011

01000001 01011001

(out-of-phase) OKAY 10011 0100101

010001 0101001 ASCII <ETX>( )

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1

Zero

High

Low

a.

b.

2.9 OK NRZ

a.

b. ( )

( <ETX> ASCII End-of-Text 26 )

NRZ

2.7.2 (Non-Return-to-Zero-Invert Code)

(NRZI Non-Return-to-Zero-Invert)

NRZI 1 high-to-low low-to-high

0 2.10 OK( ) NRZI

NRZI 1

2.7.3 (Phase Modulation Manchester Coding)

(phase modulatoin

PM) PM PM

1 up( )

0 down( )

2.11 OK PM

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1

2.10 OK NRZI

PM PM NRZ

( 2.11b )

NRZ

2.7.4

(frequency modulation FM)

1

2.12 OK FM

FM PM

FM (modified frequency modu-

lation MFM) FM

PM FM

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1a.

b.

2.11 OK (Manchester )

a.

b.

MFM

MFM PM NRZ

MFM MFM

2.7.5 (Run-Length-Limited Code)

(Run-length-limited, RLL) ASCII EBCDIC

RLL(d, k) d k 0 1

RLL

RLL NRZI RLL

flat NRZI RLL

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1

2.12 OK

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1

2.13 OK MFM

RLL RLL(2, 7)

8 ASCII EBCDIC 16

(flux reversals) MFM

50% ( )

RLL (

) Huffman (bit patterns)

( )

1

10

0.25 (P(bi=1)=1/2 P(bj=0)=1/2 => P(bibj=10)=1/21/2=1/4 )

011 0.125 2.14 RLL(2, 7)

2.15 RLL(2, 7)

0

0

2.16 MFM RLL(2,7) NRZI OK

MFM 12 RLL 8

RLL OK MFM 50%

RLL

Root

0 1

0 1 0 1

0 1 0 1

0 1

P(10)= P(11)=

P(010)= P(000)= P(011)=

P(0010)= P(0011)=

14

14

18

18

18

116

116

2.14 RLL(2, 7)

2.8

2.7.1 OKAY 4 3

<ETX>( )

Character BitPattern

RLL(2, 7)Code

101100001001100100011

010010000001001001000010000010010000001000

2.15 RLL(2, 7)

1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1

1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0

12 Transitions

8 Transitions

2.16 Ok MFM( ) RLL(2, 7)( )

100

(

(implementation-dependent))

2.8.1 (Cyclic Redundancy Check)

(Checksum)

(International Standard Book Numbers ISBN)

(Cyclic Redundancy

Check, CRC)

CRC

(systematic error detection)

(syndrome)

(cyclic)

2(Arithmetic Modulo 2)

12 11:00 2 1:00 2

2

2

(algebraic field)

0 0 00 1 11 0 11 1 0

2.27 10112 1102 2

1011+110

11012 (mod 2)

2

2 2.28

2.28 10010112 10112

1.

2. 2

3. 1

4. 1

5. 2

6.

7. 1012 10112 1012

10102

2

10112 1 23 0 22 1 21 1 20

X 2 10112

1 X3 0 X2 1 X1 1 X0

2.28

X6 + X3 + X + 1��

X3 + X +1

1011)10010111011 0010

001001 1011 0010 00101

CRCs

CRCs

1. I 10010112 ( )

2. P 10112 (P

1 )

3. I P

I 10010110002

4. I P 2 ( 2.28 )

1002 CRC (checksum)

5. I M

10010110002 1002 10010111002

6. M M P

M

• CRC-CCITT (ITU-T): X16 + X12 + X5 + 1• CRC-12: X12 + X11 + X3 + X2 + X + 1• CRC-16 (ANSI): X16 + X15 + X2 + 1• CRC-32: X32 + X26 + X23 + X22 + X16 + X12 + X11 + X10 + X8 + X7 + X5 + X4

+ X + 1

1010100 1011 ) 1001011100 1011

001001 1011

0010001011

10110000

CRC-CCITT CRC-12 CRC-16 CRC-32

32

CRC 99.8

CRC (bit pattern)

16 32

2.8.2 (Hamming Codes)

(check

bits) (redundant bits) m r

( )

(code word) m r n

n m r

m bits r bits

(Hamming distance)

1 0 0 0 1 0 0 11 0 1 1 0 0 0 1

* * *

3(

)

d d

( )

2 n

(minimum Hamming distance)

D(min) X

Y X D(min)

k ( )

D ( m i n ) k 1 D ( m i n ) 1

|_((D(min) 1)/2)_| 1 k

2k 1

r

( ASCII

)

1 |_ _| |_ 8.3 _| 8|_ 8.9_| 8

2.29 2 ( 1

) ( )

000

011

101

110

0

1

1

0

00

01

10

11

3 3 8

( *)

000*

001

010

011*

100

101*

110*

111

001

011 001

011 000

D(min) 2

D(min)

2.29 D(min)

k

D(min) 2k 1 k

2.30

2.30 (

)

0 0 0 0 0

0 1 0 1 1

1 0 1 1 0

1 1 1 0 1

D ( m i n )

D(min) 3

10000

10000

10000 00000 1 01011

4 10110 2 11101 3

[1, 4, 2, 3] 10000

00000

1

10110 10000

11000

[2, 3, 3, 2]

m r

2m

1

n n

n 1

n 1 ( n

) n n m r 2n

(n + 1) � 2m ≤ 2n

n 1 2 m

2n n m r

(m + r + 1) � 2m ≤ 2m�r

(m + r + 1) ≤ 2r

m r

(

)

m 4

(4 + r + 1) ≤ 2r

r 3 r 3

4 3

1. r n (n m r) 1 (

0)

2. 2

3. b b1 b2 ... bj

b1 b2 ... bj b ( 2 )

2.31 8 ASCII K (

)

K

1 n

m 8 (8 r 1) ≤ 2r r 4 r 4

2 n 1

12 11 10 9 8 7 6 5 4 3 2 1

3

2

1 = 1 5 = 1 + 4 9 = 1 + 82 = 2 6 = 2 + 4 10 = 2 + 83 = 1 + 2 7 = 1 + 2 + 4 11 = 1 + 2 + 84 = 4 8 = 8 12 = 4 + 8

1 1 3 5 7 9 11 1

1 3 5 7 9 11 2 2 3 6 7 10 11

2 2 3 6 7 10 11 4 4 5

6 7 12 8 8 9 10 11 12

12 11 10 9 8 7 6 5 4 3 2 10 1 0 0 1 1 0 1 0 1 1 0

K 010011010110

b9 010111010110

1 1 3 5 7 9 11

2 2 3 6 7 10 11

4 4 5 6 7 12

8 8 9 10 11

1 8 9 11

9 11 2

11 9 (

)

1 8 1 8 9

2.8.3 Reed-Soloman

100 3

(burst errors)

Reed-Soloman(RS)

CRC RS CRC

RS(n, k)

• s ( )

• k ( s )

• n

k RS(n, k)

RS(255, 223) 223 8 32

(syndrome) 255

16

Reed-Soloman

(

)Reed-Soloman

g(x) = (x � ai)(x � ai�1) . . . (x � ai�2t)

t n k x ( ) g(x ) GF(2 s)

( Galois

(integer field) )

n RS

c(x) = g(x) � i(x)

i(x)

Reed-Soloman

(core dump)

(n � k)�

2

ASCII EBCDIC

(Unicode) Java Windows

ASCII EBCDIC

ASCII EBCDIC

Bunt(1988)

Kunth(1998) Computer Algorithm

(

Kunth )

Goldberg(1991) Schwartz (1999) IBM

S y s t e m / 3 9 0 I E E E

Soderquist Leeser(1996)

www.unicode.org

The Unicode Standard (2000)

www.iso.ch

www.ansi.org

Mee Daniel(1988)

Arazi (1988)

Reed-Soloman Galois

Pretzel (1992)

Galois Artin(1998) Warner(1990) (

) Warner

( )

Arazi, Benjamin. A Commonsense Approach to the Theory of Error Correcting Codes. Cambridge,MA: The MIT Press, 1988.

Artin, Emil. Galois Theory. New York: Dover Publications, 1998.

Bunt, Lucas N. H., Jones, Phillip S., & Bedient, Jack D. The Historical Roots of Elementary Math-ematics. New York: Dover Publications, 1988.

Goldberg, David. “What Every Computer Scientist Should Know About Floating-Point Arith-metic.” ACM Computing Surveys 23:1 March 1991. pp. 5–47.

Knuth, Donald E. The Art of Computer Programming, 3rd ed. Reading, MA: Addison-Wesley,1998.

Mee, C. Denis, & Daniel, Eric D. Magnetic Recording, Volume II: Computer Data Storage. NewYork: McGraw-Hill, 1988.

Pretzel, Oliver. Error-Correcting Codes and Finite Fields. New York: Oxford University Press,1992.

Schwartz, Eric M., Smith, Ronald M., & Krygowski, Christopher A. “The S/390 G5 Floating-Point Unit Supporting Hex and Binary Architectures.” IEEE Proceedings from the 14th Sympo-sium on Computer Arithmetic. 1999. pp. 258–265.

Soderquist, Peter, & Leeser, Miriam. “Area and Performance Tradeoffs in Floating-Point Divideand Square-Root Implementations.” ACM Computing Surveys 28:3. September 1996. pp.518–564.

The Unicode Consortium. The Unicode Standard, Version 3.0. Reading, MA: Addison-Wesley,2000.

Warner, Seth. Modern Algebra. New York: Dover Publications, 1990.

1. bit

2. bit( ) byte( ) nibble( ) word( )

3.

4. (radix)

5. 2.1 ( )

6.

7.

8.

9.

10. double-dabble -

11.

12.

13.

14.

15.

16.

17.

18. IEEE-754

19. EBCDIC BCD

20. ASCII

21.

22.

23. (non-return-to-zero)

24. Manchester (non-return-to-zero)

25. (run-length-limited encoding)

26. (cyclic redundancy checks)

27.

28.

29.

30.

31. (burst errors)

32.

◆1.

◆ a) 45810 = ________ 3

◆ b) 67710 = ________ 5

◆ c) 151810 = _______ 7

◆ d) 440110 = _______ 9

2.

a) 58810 = _________ 3

b) 225410 = ________ 5

c) 65210 = ________ 7

d) 310410 = ________ 9

◆3.

◆ a) 26.78125

◆ b) 194.03125

◆ c) 298.796875

◆ d) 16.1240234375

4.

a) 25.84375

b) 57.55

c) 80.90625

d) 84.874023

5. 8 (signed magnitude)

◆ a) 77

◆ b) �42

c) 119

d) �107

6. 3

a) (signed magnitude)

b)

c)

7. 4

a) (signed magnitude)

b)

c)

8. x

a) (signed magnitude)

b)

c)

9. ( ) 6

◆ a)

b)

10.

(Zebronians) 40 (

(zebra) 40 )

40

BCZ(Binary-Coded

Zebronian) BCD

11.

◆ a) 1100

� 101

b) 10101

� 111

c) 11010

� 1100

12.

a) 1011

� 101

b) 10011

� 1011

c) 11010

� 1011

13.

◆ a) 101101 ÷ 101

b) 10000001 ÷ 101

c) 1001010010 ÷ 1011

14.

a) 11111101 ÷ 1011

b) 110010101 ÷ 1001

c) 1001111100 ÷ 1100

◆15. double-dabble 102123 (

)

16.

+ 0 + (�0) =

(�0) + 0 =

0 + 0 =

(�0) + (�0) =

◆17. 4

j

0 → j // Store 0 in j.-3 → k // Store -3 in k.while k ≠ 0j = j + 1k = k - 1

end while

18. 1 3 4

a)

(

0 1 )

b)

◆19.

20. (14 5

16 8 1 )

0 1 0 1 1 0 0 10 1 1 1 1 0 0 0

a) 100.0 0.25

b) 2

c) b

21. (underflow)

22.

23. a 1.0 29 b 1.0 29 c 1.0 21 (14

5 16 8 1

)

b + (a + c) =

(b + a) + c =

24. a) A ASCII 1000001 J ASCII

b) A EBCDIC 1100 0001 J EBCDIC

◆25. 24 24 295

◆ a) 295

◆ b) 8 ASCII 295

◆ c) BCD +295

26. 7 ASCII ASCII

1001010 1001111 1001000 1001110 0100000 1000100 1001111 1000101

◆27.

28. 4 7 ASCII

a) Non-return-to-zero( )

b) Non-return-to-zero-invert( )

c) Mechester

d) Frequency modulation( )

e)

f)

( 1 high 0 low )

29. NRZ

30. 3 1 (

)

31.

◆32.

0011010010111100

0000011110001111

0010010110101101

0001011010011110

33.

0000000101111111

0000001010111111

0000010011011111

0000100011101111

0001000011110111

0010000011111011

0100000011111101

1000000011111110

34. 10

a)

b)

10 1001100110

◆35. 7

4 11

1 0 1 0 1 0 1 1 1 1 0

36.

1 0 1 0 1 0 1 1 1 1 0

37. Reed-Soloman

38. CRC CRC

◆39. 2(modulo 2)

◆ a) 10101112 ÷ 11012

◆ b) 10111112 ÷ 111012

◆ c) 10110011012 ÷ 101012

◆ d) 1110101112 ÷ 101112

40. 2(modulo 2)

a) 11110102 ÷ 10112

b) 10101012 ÷ 11002

c) 11011010112 ÷ 101012

d) 11111010112 ÷ 1011012

◆41. CRC 1011 1011001 CRC

42. CRC 1101 01001101 CRC

◆43. ( 80486 Pentium Pentium IV SPARC Alpha

MIPS)