| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Backgrounder: Data Representation and the Mathematics of Computing Humans use decimal (base 10) numbers to represent numeric information, and various alphabets and symbol systems to represent other types of information. In contrast, computers understand only one basic type of information: ones and zeroes, which themselves are representative of either an on or off electrical or light state within the hardware of the device. These ones and zeroes are combined in various ways to form all the more common data elements we are used to finding in computers: regular numbers, characters and files. However, all of these are really only abstractions; the ones and zeroes are always underneath whatever logical structures used within the computer. This same basic foundation of ones and zeroes applies to networking as well. Even though most of the information in a network is exchanged in a logical fashion between higher-layer protocols, underlying all networking structures are the ones and zeroes sent over the network medium. Understanding how data is represented and manipulated in computer systems is important background information that will help you comprehend many of the different technologies. Not only are computer data representation and mathematics important for explaining how low-level physical layer modulation and encoding techniques work, they come into play even for higher-level concepts, such as how IP addresses are set up and used on the Internet. In this section I provide some general background information on how numerical data is represented, stored and manipulated within computers and networking hardware. I begin with a description of binary numbers and the different terms used to refer to collections of binary information of various sizes. I describe the different types of numbering systems used in computer systems, such as octal, decimal and hexadecimal, and how data can be converted between these different types. I explain how arithmetic is performed on binary and hexadecimal numbers. I then discuss boolean logic and how logical functions are used to manipulate binary data. These explanations then form the basis for a discussion of how logical functions are used for setting, clearing, inverting and masking bits. These operations are employed extensively in certain networking technologies and protocols. Masking operations are especially often used in IP addressing, so even though this section seems rather low-level it is quite relevant to the world of TCP/IP. Needless to say, many of you reading this Guide know most or all of the information in this section, so feel free to skip (or just skim) those topics that you already know. However, I wanted to provide this background detail for the sake of those new to computing, or those needing a refresher. The pages are somewhat long and I try to assume little in the descriptions, so you may want to breeze through the parts that seem familiar. However, even those of you who know what a bit and byte are and the difference between binary and decimal numbers may find the discussion of bit masking worth perusing.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |