Computer Codes Representation of Data in Binary
Computer Codes Representation of Data in Binary
Representation of Data in
Binary
Computer codes are used for internal representation of
data in computers
As computers use binary numbers for internal data
representation, computer codes use binary coding
schemes.
In binary coding, every symbol that appears in the data is
represented by a group of bits.
The group of bits used to represent a symbol is called a
byte. (1 byte contains 8bits)
Representation of Data in
Binary
Binary and Switches
- Binary is a mathematical number system: a way of
counting.
- The computer has switches to represent data and switches
have only two states: ON and OFF. Binary has two digits
to do the counting: 0 and 1
Representation of Data in
Binary
Representation of Data in
Binary
Using ASCII,
Binary equivalent of letter a 01100001
Binary equivalent of Caius - 01000011 01100001
01101001 01110101 01110011
Representation of Data in
Binary
Bits and Bytes
One binary digit (0 or 1) is referred to as a bit, which is
short for binary digit.
0 1 bit
1 1 bit
0110 4 bits
01101011 8 bits
Representation of Data in
Binary
Representing Data In Bytes
- A single byte can represent many different kinds of data.
What data it actually represents depends on how the
computer uses the byte.
Representation of Data in
Binary