Professional Documents
Culture Documents
Bits and Bytes
Bits and Bytes
bits
A bit (a contraction of binary digit) is the basic capacity of information in computing and telecommunications; a bit represents either 1 or 0 (one or zero) only. The representation may be implemented, in a variety of systems, by means of a two state device.
bytes
A group of nine related bits is called byte, which represents a storage location internally in memory and on external devices. Each byte consists of eight bits for data and one bit for parity.
bytes
1 bit bit bit bit bit bit bit bit bit 0 1 0 0 0 0 1 0
data bits parity
parity bit
A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is even or odd. Parity bits are used as the simplest form of error detecting code.
rule of parity
the number of bits that are ON (1) in each byte must always be ODD.
example:
byte
0 1
1 2
1 3
even odd
byte
0 0 1 0 1 0 1 0
odd
example:
error checking
odd OK
error checking
even
transmission error
related byte
A program can treat a group of one or more related bytes as a unit of data., such as time or distance. A group of bytes that defines a particular value is a commonly known as a DATA ITEM or FIELD. The processor also supports certain data sizes that are natural to it.
word
a 2- byte (16-bit) data item
doubleword
a 4- byte (32-bit) data item
quadword
a 8- byte (64-bit) data item
paragraph
a 16- byte (128-bit) area
kilobyte (KB)
the number 210 equals 1,024 640 Kilobytes X 1,024 = 655,360 Bytes
10
10 9 8
256
7
128
6
64
5
32
4
16
3 2
8 4
1
2
1024 512
megabyte (MB)
the number 220 equals 1,024
1 Megabyte
= 1,024 Kilobytes
= 1,048,576 Bytes
conversion table
0
4 2
1 2 1
0 1 0
64 32 16 8 6 5 4 3
bit number
binary arithmetic
0 0 0 0 1 1 1 1 10 1 1 1 11
decimal
60 53 113
number -65
1 0 1 1 1 1 1 1 64 32 16 8 4 2 1 128
- 128
32 16 8
-128
-65
63
+65 -65 00