You are on page 1of 37

Videolearner.

com

2.1
2.1.1

bits,
1.3.2.

1
0
4
2
3
10010=1x 2 + 0x 2 + 0x 2 + 1 x 2 + 0x 2
43210

Videolearner.com

2.1
2.1.1
,
, .
,
2 (2's complement).
To .
1, , 0, .

Videolearner.com

2.1
2.1.1
.
8 bits,
,
0 255 = 28 - 1 ( 0000 0000 1111 1111).
-128


,
( ) bit :
-1x27 =
0x27

-128 bit 1

=0

bit 0

Videolearner.com

2.1
2.1.1

2-1 8 bits bit


2 .
6

-128
0

0
0
0
1
1
1
1

64
1

0
0
0
1
1
1
1

32
1

0
0
0
1
1
1
1

16
1

0
0
0
1
1
1
1

8
1
.
0
.
0
.
0
0
0
1
1
1
1
.
0
.
0
.

4
1

0
0
0
1
1
1
1

2
1

1
0
0
1
1
0
0

1
1

0
1
0
1
0
1
0

=
=

=
=
=
=
=
=
=

8 bits
2

0+64+32+16+8+4+2+1
. . . . . ..
0+64+0+0+0+4+2+1
. . . . . ..
0+0+0+16+0+4+2+1
. . . . . ..
0+0+0+0+0+0+2+0
0+0+0+0+0+0+0+1
0+0+0+0+0+0+0+0
-128+64+32+16+8+4+2+1
-128+64+32+16+8+4+2+0
-128+64+32+16+8+4+0+1
-128+64+32+16+8+4+0+0
. . . . . ..
-128+64+32+16+0+0+0+0
. . . . . ..
-128+0+0+16+0+0+0+0
. . . . . ..

=+127=27-1
. .
=+71
. .
=+23
. .
=+2
=+1
=0
=-1
=-2
=-3
=-4
. .
=-16
. .
=-112
. .

-128+0+0+0+0+0+0+0

=-128

Videolearner.com

2.1
2.1.1
1000 0000 = -128 = -27

( )

.
-1x27 =-128 bit 1

0111 1111 = +127 = -27-1

.
27-1 = +127

- 0x27=0

bit 0

, 8 bits
-128 (=-27) +127 (=27-1).
16 bits
0 65535 (=216-1),
-32768 (=-215) +32767 (=215-1).

Videolearner.com

2.1
2.1.1
, 8 bits
-128 (=-27) +127 (=27-1).

-128 (=-27) +127 (=27-1).

16 bits
0 65535 (=216-1),
-32768 (=-215) +32767 (=215-1).

Videolearner.com

2.1
2.1.1
16 bits
0 65535 (=216-1),

0 65535 (=216-1),

-32768 (=-215) +32767 (=215-1).

-32768 (=-215) +32767 (=215-1).

Videolearner.com

2.1
2.1.1
2
.
bits
0 1,
1 0
1.
-5, :

5 = 0000 0101
1111 1010
+1
-5 = 1111 1011

bits 0 1,
1 0
1

Videolearner.com

2.1
2.1.1

2


,
,
.. 11 - 5 = 11 + (-5).
:

11
-5

0000 1011
- 0000 0101
6

0000 1011
- 0000 0101
+1
0000 0110

Videolearner.com

2.1
2.1.2
,
(floating point) .

bits.
,
,
,
1 10

10. :
5 4 321

6,1, 0,00
, ,0,= 6,1x10
4 321

1 234 5 678

-8

0,0,0,0,0,00
, ,0,3,7 =3,7x10
4

1, 8,000
, , ,= 1,8 x10

Videolearner.com

2.1
2.1.2
,
2.
,
1/2 1,
2. :

5 4 321

0,1, 1,000
, , ,= 0 ,11x2

1 234 5

0,0,0,0,0,01
, 11 = 0, 1 11 x2
12

0,0,0,1 1 = 0,1 1x2

-2

-5

Videolearner.com

2.1
2.1.2

10x10 =100 = 10

12
1
1
=
0,1 =
1
10
10

10x10x10 =1000= 10

123

1
1
= 10
=
0,01=
2
100 10
1
1
-3
= 10
=
0,001 =
3
1000 10
!
-1

= 10

-2

Videolearner.com

2.1
2.1.2

2x2 = 2

2x2x2= 2

12
1
1
0,5 =
=
1
2
2

123
1
1
1
-2
0,25
=2
=
=
= 2 =2
4
2x2 2
-1

1
0,125 =
8

1
1
-3
=
= 3 =2
2x2x2
2

Videolearner.com

2.1
1
2
1
4

3
4
1
8
7
8
3
8

-1

0,1
-1

-2

-1

0,01
-1 -2

-2

+2

0,11
-1 -2

2-3
-1

0,001

+2

-2

2-2 + 2-3

1
16

3
16

5
16

-4

-3

+2

-1 -2 -3

0,111
-1 -2 -3

0,011
-1 -2 -3

0,0001
-1 -2 -3 -4

-3

-2

-4
2
+

0,0011

-4
2
+

0,0101
-1 -2 -3 -4

-1 -2 -3 -4

Videolearner.com

2.1
2.1.2
: 8bit

0 010 ,1100

-/+

210 1234
20

22

2-4

21

+ 020 ,

2-3

2-2
2-1

1 1
2 4

00= 2, + 0,50 + 0,25= + 2,75

2.1
2.1.2
: 8bit

0,10,110

0,10 11 x 2

-2

0,10 11 x 2

-010

Videolearner.com

Videolearner.com

2.1
2.1.2
2

(mantissa)
2 (exponent).
,
.
32 bits

2(10)
3(11)

24 bits

8 bits
bit (0 ,1 )
bit ( 1)

Videolearner.com

2.1
2.1.2
o 8-bit

01011010
+1

1 1 1 1
2 4 8 16

-4 2 1

) =(

2
1
1 1
x2
+ +
2
8 16

) =

8 2 1
x4
+ +
16 16 16

11
x4
16

= = 2,75
11
4

Videolearner.com

2.1
2.1.2
o 8-bit

1001
0010
,

-1

+1

0010
1001
0010
,


+x
-x

+2
1001
,
0110
,
+ 1
1
2
1
+
+
,
0111
2



0 1 , 1 0
1

+3,5

Videolearner.com

2.1
2.1.2

.
bit

( ).
To bit 0, 1 .
32 bits

2(10)
3(11)

0
1

24 bits

8 bits
bit (0 ,1 )
bit ( 1)

, , 2.
8 bits -128 127.

Videolearner.com

2.1
2.1.2
:
1.

3BD74AF8

( )

00111011 11010111 01001010 11111000


10 00111011 11010111 01001010 11111000

= 1000111011 11010111 01001010 = 187/256 = 0,730

= 11111000 = -8

1011 1011 100000000

2: 11111000
0 & 1 :

00000111

1 :
+1
= 00001000 = 8

Videolearner.com

2.1
2.1.2
:
1.

99266407

( )

1001 1001 0010 0110 0110 0100 0000 0111


1001 1001 0010 0110 0110 0100 0000 0111

= 1001 1001 0010 0110 0110 0100 0000 0111 = 153/256 = 0,598

Videolearner.com

2.2

ASCII UNICODE.

Videolearner.com

2.2
2.2.1. ASCII
(ASCII)
American Standard Code for Information Interchange,
ov
, Unicode.
ASCII 8 bits,

bit 7.
128 (27) .

, ASCII ,
0 127 ( 128 )
.

2.2
2.2.1.

0 - 31

ASCII

( ),

Videolearner.com

2.2
2.2.1.

ASCII

0 - 31

( ),

32 - 63

, , ,

Videolearner.com

2.2
2.2.1.

ASCII

0 - 31

( ),

32 - 63

, , ,

64 - 95

Videolearner.com

2.2
2.2.1.

ASCII

0 - 31

( ),

32 - 63

, , ,

64 - 95

96 -127

Videolearner.com

2.2
2.2.1.

ASCII

Videolearner.com

2.2
2.2.1.

ASCII


.
,
,
bit .

Videolearner.com

2.2
2.2.1.

ASCII

Videolearner.com

2.2
2.2.1.

ASCII

128 .

,
(.. ).

.

Videolearner.com

2.2
2.2.1.

ASCII

Videolearner.com

Videolearner.com

2.2
2.2.2. UNICODE
Unicode
ASCII.
, 128-255 ASCII
, , .

,
.
o Unicode
ISO (International Standards Organisation) o 1993

.

Videolearner.com

2.2
2.2.2.

UNICODE

Unicode
,
,
,
,


,

.

,


(CJK set)
,
,
.

Videolearner.com

2.2
2.2.2.

UNICODE

2
39.000 ,
.
6.000
20.000 .

Videolearner.com

1. .
2. (2) bytes;.
3. UNICODE;
4. ASCII. ;
01001000 0110010101101100 01101100 01101111

You might also like