Data Organization
Data Organization
Lesson
Data Organization
2
Objectives
1. Understand the relationship between bit, nibble bytes, word, and double word.
2. Learn the application of bits and bytes works in a digital system.
3. Know the numerical values of bits, bytes, nibble, word and double word.
Introduction
Computers happen to operate using the base-2 number system, also known as the binary
number system (just like the base-10 number system is known as the decimal number system).
The reason computers use the base-2 system is because it makes it a lot easier to implement
them with current electronic technology. In pure mathematics a value may take an arbitrary number
of bits. Digital systems, on the other hand, generally work with some specific number of bits. Common
collections are single bits, groups of four bits (called nibbles), groups of eight bits (called bytes),
groups of 16 bits (called words), and more. The sizes are not arbitrary. There is a good reason for
these particular values.
Bits
The smallest “unit” of data on a binary computer or digital system is a single bit. Bit, an
abbreviation for Binary DigIT, can hold either a 0 or a 1. A bit is the smallest unit of information a
computer can understand. Since a single bit is capable of representing only two different values
(typically zero or one) one may get the impression that there are a very small number of items one
can represent with a single bit. That’s not true! There are an infinite number of items one can
represent with a single bit.
With a single bit, one can represent any two distinct items. Examples include:
• zero or one
• true or false
• on or off
• male or female
• right or wrong
However, one are not limited to representing binary data types (that is, those objects which
have only two distinct values). One could use a single bit to represent the numbers 321 and 1234. Or
perhaps 6251 and 2. One could also use a single bit to represent the colors green and blue. One could
even represent two unrelated objects with a single bit. For example, one could represent the color
red and the number 3256 with a single bit. One can represent any two different values with a single
bit. However, one can represent only two different values with a single bit.
To confuse things even more, different bits can represent different things. For example, One
bit might be used to represent the values zero and one, while an adjacent bit might be used to
represent the values true and false. How can one tell by looking at the bits? The answer, of course, is
that one can’t. But this illustrates the whole idea behind computer data structures: data is what one
define it to be.
If one uses a bit to represent a Boolean (true/false) value then that bit (by definition)
represents true or false. For the bit to have any true meaning, one must be consistent. That is, if one
is using a bit to represent true or false at one point in his program, he shouldn’t use the true/false
value stored in that bit to represent green or blue later.
Since most items one will be trying to model require more than two different values, single
bit values aren’t the most popular data type used. However, since everything else consists of groups
of bits, bits will play an important role in programs. Of course, there are several data types that
require two distinct values, so it would seem that bits are important by themselves. However,
individual bits are difficult to manipulate, so other data types are often used to represent boolean
values.
Nibbles
Nibble is the group or collection of 4 bits or half an octet. It takes four bits to represent a
hexadecimal digit. It is also known as half-byte or tetrad. In a networking or telecommunication
context, the nibble is often called a semi-octet, quadbit or quartet. A nibble has sixteen (24) possible
values. The nibble is used to describe the amount of memory used to store a digit of a number stored
in packed decimal format (BCD, Binary Coded Decimal, to be discussed in the next lesson)
Bytes
The term byte was coined by Werner Buchholz in June 1956, during the early design phase for
the IBM Stretch computer, which had addressing to the bit and variable field length (VFL)
instructions with a byte size encoded in the instruction. It is a deliberate respelling of bite to avoid
accidental mutation to bit.
Computer memory has to represent and store data in a form of letter, numbers and symbols
but a single bit cannot be of much use. Bits needs to be combined to represent meaningful data. If one
nibble is equivalent to four bits, the collection or group of eight bits is called BYTE. Each byte can
hold a string of bits that need to be used in larger unit for application purposes. As an example, a
stream of bits can constitute a visual image for a program that displays image.
It can represent a character and is the smallest addressable datum (data item) on the most of
the digital systems (e.g. 80 × 86 microprocessor). The most important data type is the byte. Main
memory and input/output addresses on the 80 × 86 are all byte addresses. This means that the
smallest item that can be individually accessed by an 80 × 86 program is an eight-bit value. To access
anything smaller requires that you read the byte containing the data and mask out the unwanted bits.
• Measurement of data
• Quantifying speed of data
• C and C++ programming (byte size data)
For instance, 1001 01112 is an 8-bits binary number which similarly means that it is
equivalent to one byte. Take note that one byte has exactly two nibbles.
7 6 5 4 3 2 1 0 Bit location
1 0 0 1 0 1 1 1
MSB (Most Significant Bit) LSB ( Least Significant Bit)
Also called the high order bit also called the low order bit
hexadecimal digits.
High Nibble Low Nibble
Page
Bachelor of Science in Industrial Technology Major in Computer Technology
Since a byte contains eight bits, it can represent 28, or 256, different values. Generally, a byte
is used to represent numeric values in the range 0.255, signed numbers in the range –128.. + 127
(refer “Signed binary representation” to be di). Many data types have fewer than 256 items so eight
bits is usually sufficient.
The most important use for a byte is holding a character code. Characters typed at the
keyboard, displayed on the screen, and printed on the printer all have numeric values.
Words
A word a group of 16 bits or 2 bytes. Bits in a word are numbered starting from zero on up
to fifteen.
Like the byte, bit 0 is the low order bit or the LSB and bit 15 is the high order bit or
the MSB.
When referencing the other bits in a word use their bit position number. Notice that
a word contains exactly two bytes. Bits 0 through 7 form the low order byte, bits 8 through
15 form the high order byte
With 16 bits, 216 (65,536) different values can be represented. These could be the values in
the range 0 to 65,535 (or –32,768 to +32,767) or any other data type with no more than 65,536
values. Words can represent integer values in the range 0 to 65,535 or –32,768 to 32,767.
4 Page
Bachelor of Science in Industrial Technology Major in Computer Technology
Double Words
A double word is exactly what its name implies, a pair of words. Therefore, a double word quantity
is 32 bits long as shown:
Summary
Digital data are represented in using binary number where each binary digit is called bit. Bit
(0 or 1) is the fundamental building block of computer information. On the other hand, bit represent
a very small amount of data or information. In order for a system to be able to recognize, process and
store data into a meaningful information, one must have collection of bits. These bits allows large of
information and more complex data types to be stored. The most common grouping is to take eight
bits and reference them as a single unit. A collection of eight bits is technically called an octet, but is
more commonly called a byte. . A byte is the unit that computers use to represent a character such as
a letter, number or a typographic symbol (for example, “h”, “7”, or “$”). Other terms are also used to
define different group or the length of bits such as nibble, word and double word.