Computer Science
Bit
A bit is the smallest unit of data in computing and digital communications. It can have a value of either 0 or 1, representing the binary state of off or on, respectively. Bits are used to encode and process information in digital systems, and they form the basis for representing and manipulating data in computer science.
Written by Perlego with AI-assistance
Related key terms
1 of 5
10 Key excerpts on "Bit"
- eBook - PDF
- Aden Evens(Author)
- 2015(Publication Date)
- Bloomsbury Academic(Publisher)
1 From Bits to the Object Begin with the Bit. Bits are a de facto universal language of the digital. Whatever happens in the computer, all the input and all the output and whatever transpires in between, all of it is encoded as Bits, lists of 0s and 1s. In computing, a Bit, contracted from binary digit , is a device something like a switch obtaining one of two states. The two states of a switch often distinguish on and off ; in a Bit these values or states are usually called 0 and 1, but a Bit can equally be thought of as true or false , yes or no , or , or any two distinct, exclusive values. The meaning of a Bit, and thus the meanings of its two states, depend on how the Bit is employed, what it gets used for. For the Bit and its two states have no intrinsic meaning, or at least none aside from an assertion of one state and not the other. In particular, though Bits are often used as numerals to represent numeric values, there is nothing inherently numeric about the meaning of a Bit’s value, and its two states do not inherit the rich histories of the numerals that label those states. In the right context, a given Bit could designate that a particular pixel on the monitor manifest one shade of orange rather than a slightly darker shade. In another context, it could store a datum corresponding to a user’s gender as masculine or feminine. (More Bits would be necessary to store a fuller range of genders.) Elsewhere a Bit could tell the computer to skip the next instruction if the result of the previous calculation was a positive number rather than telling the computer to skip the next instruction if the result of the previous calculation was a negative number. This does not begin to hint at the enormous flexibility and ubiquity of the Bit. All information in the computer, both data and instructions, is materially instantiated and logically encoded in Bits. The Bit is the basic building block of digital operation. - eBook - PDF
- M Smit R Jonker(Author)
- 2017(Publication Date)
- Macmillan(Publisher)
Each character or number that makes up the source code is assigned a unique ‘Bit pattern’. The computer stores all data electronically using binary digits . A bi nary digi t is known for short as a Bit . A Bit can be in one of two states: ‘on’ or ‘off’, equivalent to 1 and 2. One Bit can only be used to represent two different values, 0 and 1. However, by grouping Bits together we can store more values, for example: • 2 Bits (2 2 ) can represent 4 different values: 00, 01, 10 and 11. • 3 Bits (2 3 ) can represent 8 different values: 000, 001, 010, 100, 011, 101, 110 and 111, and so on. A data unit that consists of 8 Bits (2 8 ) is known as a byte and it can represent 256 values. Other terms used for data units are as follows: • A nybble is equal to 4 Bits. • A halfword is equal to 16 Bits or 2 bytes. • A word is equal to 32 Bits or 4 bytes. • A doubleword is equal to 64 Bits or 8 bytes. Programming languages may specify data sizes in different terms, for example Java defines four sizes: byte = 8 Bits; short = 16 Bits; int = 32 Bits and long = 64 Bits. 82 Module 10 10.1.2 How data is stored in memory Computer memory plays an important role in saving and retrieving data. In a computer, programs and data are stored on a hard disk drive, also known as secondary memory. Whenever you access a program, the instructions that have to be executed are copied to the computer’s primary memory, also called random access memory (RAM), from where it can be accessed quickly by the CPU. Apart from hard disk drives and RAM, there are also other types of memory that can be used to store data and programs. The different methods of storing data are shown in Figure 10.1. - eBook - PDF
The Architecture of Computer Hardware, Systems Software, and Networking
An Information Technology Approach
- Irv Englander, Wilson Wong(Authors)
- 2021(Publication Date)
- Wiley(Publisher)
Computers perform all of their operations using the binary, or base 2, number system. All program code and data are stored and manipulated in binary form. Calculations are performed using binary arithmetic. Each digit in a binary number is known as a Bit (for binary digit) and can have only one of two values, 0 or 1. Bits are commonly stored and manipulated in groups of 8 (known as a byte), 16 (usually known as a halfword), 32 (a word), or 64 Bits (a doubleword). Sometimes other groupings are used. The number of Bits used in calculations affects the accuracy and size limitations of num- bers manipulated by the computer. And, in fact, in some programming languages, the num- ber of Bits used can actually be specified by the programmer in declaration statements. In the programming language Java, for example, the programmer can declare a signed integer variable to be short (16 Bits), int (32 Bits), or long (64 Bits) depending on the anticipated size of the number being used and the required accuracy in calculations. The knowledge of the size limits for calculations in a particular language is sometimes extremely important, since some calculations can cause a numerical result that falls outside the range provided for the number of Bits used. In some cases, this will produce erroneous results, without warning to the end user of the program. It is useful to understand how the binary number system is used within the computer. Often, it is necessary to read numbers in the computer in their binary or equivalent hexadec- imal form. For example, colors in HTML, Java, and many other languages can be specified as a six-digit hexadecimal number, which represents a 24-Bit binary number. This chapter looks informally at number systems in general and explores the relationship between our commonplace decimal number system and number systems of other bases. Our emphasis, of course, is upon base 2, the binary number system. - eBook - PDF
Explorations in Computing
An Introduction to Computer Science
- John S. Conery(Author)
- 2010(Publication Date)
- CRC Press(Publisher)
Chapter 7 Bit by Bit Binary codes and algorithms for text compression and error detection Computer systems use a variety of technologies to store and transmit data. Processor and memory chips are based on semiconductor technology; disks are made from magnetic ma-terials spread over the surface of a thin, circular plate; removable disks have a reflective surface with tiny pockmarks that are detected by lasers; digital cameras and cell phones store digital information in “flash” memories that retain their data even when the device is turned off; networks transfer information in the form of light waves over fiber-optic cables. As diverse as these technologies are, they have one thing in common that allows them to be used to store or transmit information: they are physical devices that can be set to one of two different states. For example, a semiconductor memory cell will be in a state where we can measure one of two different voltage levels, and a section of a DVD will be smooth or have an indentation, which can be detected by a laser scanning the surface of the disc. The role of computer science is to figure out how to represent information in a form that can be stored or transmitted using these technologies. Real-world objects, things like pieces of text from a book, images captured by a camera, or sounds recorded in a studio, can be described by a sequence of symbols. Information can be stored or transmitted using any of the technologies mentioned above by equating the two possible states with different symbols. Traditionally, the two symbols are 0 and 1, the digits of the binary number system. Exactly how the two states are managed physically is in the realm of computer engineer-ing, or, as programmers like to say, is “a hardware problem.” Engineers designing a memory system can decide what voltage levels will be used inside the chips, and might assign the symbol 1 to a level of 3.5 volts and the symbol 0 to a level of 0 volts. - eBook - PDF
- Kyla McMullen, Elizabeth Matthews, June Jamrich Parsons, , Kyla McMullen, Kyla McMullen, Elizabeth Matthews, June Jamrich Parsons(Authors)
- 2021(Publication Date)
- Cengage Learning EMEA(Publisher)
Data representation refers to the way data is abstracted or modeled. When data is abstracted into a series of units that can have one of two states, the data representation is binary. The exact mechanism for data rep- resentation may vary from one device to another, but as shown in Figure 26-2, the data retains two important characteristics: it is digital, and it is binary. Figure 26-2 Computer data is digital and it is binary N S S N Circuits charged or uncharged Memory CD/DVD drive Hard drive Wi-fi Flash drive Reflected or non-reflected spots of light Particles oriented north or south High frequency or low frequency radio waves Open or closed circuits RomboStudio/Shutterstock.com, Mile Atanasov/ Shutterstock.com, Timur Zima/Shutterstock.com, beboy/Shutterstock.com, Duda Vasilii/Shutterstock.com Bits (26.1.3, 26.1.4, 26.1.5, 26.1.6, 26.1.7, 26.1.8, 26.1.9) Although computers might use on/off signals, frequencies, colored dots, or magnetized particles to physically represent data, you can envision those two states as the binary digits 0 and 1. A binary digit is commonly referred to as a Bit, abbreviated as a lowercase “b.” A Bit is the smallest unit of data manipulated by a digital device. A single Bit can be either a 0 or 1—that's two possibilities. A single Bit could represent true or it could repre- sent false. Or, a single Bit could represent yes or no. As shown in Figure 26-3, one Bit can be used to represent either of two units of information. Figure 26-3 One Bit can represent two units of information Bits: Sunny Rainy 0 1 Copyright 2022 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. - eBook - PDF
The Silicon Web
Physics for the Internet Age
- Michael G. Raymer(Author)
- 2009(Publication Date)
- CRC Press(Publisher)
If you and Bob agree that he will write the number in binary, then the number will be between (and including) 0000000 and 1111111. For example, the special stone might be the one identified as 1100101. Clearly Bob will need to specify the value (0 or 1) of each of 7 Bits in order to convey the needed information. FIGURE 2.7 Searching through a collection of 128 stones requires asking seven yes/no questions. (a) 2 4 3 1 5 7 6 (b) 40 The Silicon Web: Physics for the Internet Age What if the number of possible outcomes or answers does not equal exactly a power of 2, that is, does not equal 2 n for some value of n ? In this case, we can specify the amount of information to be within a range somewhere between two whole numbers. For example, if there are 135 stones in the field containing the diamond, then it will take on average slightly more than seven questions to unearth the proper location. Sometimes it will take seven questions, and sometimes eight questions. But, it will not take more than eight questions, which would be enough to sort through 256 stones. For this case, we can say that the amount of information is between 7 and 8 Bits. How much information can be transmitted in a message of a given length? If we can assume that the message is written in the most efficient way, then the answer is simple. Write the message as a single list of binary digits; that is, ones and zeros. Then the amount of information equals the number of binary digits, or Bits, in the list. The question of how to ensure that the message is written in the most efficient way is subtle and will be discussed in a later chapter. 2.8.1 Bits, Bytes, and Other Units The basic unit of information is the Bit. One byte is defined as 8 Bits and is abbrevi-ated as B. For example, you might ask a salesperson how much memory a particular memory device has, and the response might be “1,000 bytes.” This is the same as 8,000 Bits. - eBook - ePub
- Henry M. Walker(Author)
- 2012(Publication Date)
- Chapman and Hall/CRC(Publisher)
In a typical binary machine, a common convention is that any voltage from 0 to 1.3 volts is interpreted as the digit 0, whereas voltages above 1.7 volts represent the digit 1. Having a range of voltages allows circuits to accommodate variations of voltage that may arise naturally. (Circuits are designed to avoid voltages between 1.3 and 1.7 volts. These intermediate voltages might be hard to interpret so such voltages may be considered errors.) With no other choices regarding possible digit values, processing can utilize simple and cheap on/ off circuits.Technically, a single 0 or 1 is called a Bit of information. Such a data element is sufficient to hold the answer to a yes/no or true/false question, but a single Bit is inadequate to store more general information. Thus, in a binary system, several Bits typically are grouped together in various size units, so that they can hold greater information. A particularly common grouping involves 8 Bits and is called a byte.To see how natural numbers, the integers staring with 0 and going higher, can be stored in a byte, consider the following number scheme. (If you know about the binary system, this will seem quite familiar.) Note that there are eight columns, or place values, because this is an 8-Bit number. The placement of each 0 and 1 influences their value. To convert a binary number into a decimal number, start at the right of a sequence of 0s and 1s, and label the digits with a power of 2. Then add the labels corresponding to where the digit 1 appears in the sequence. The sidebar illustrates how to find the decimal value of a binary integer. The process is quite similar to our earlier example with base 10 (the decimal system), except now the digits are labeled with powers of 2.EXAMPLE: COMPUTING THE DECIMAL VALUE OF A BINARY INTEGERIn the binary system, the location of each digit has a label (a power of 2) that indicates the relative weight of the digitIn this system, 00000000 represents the decimal number 0, 00000001 represents the decimal number 1, 00000010 represents the decimal number 2, and so forth. Following this pattern, the largest binary number would be 11111111 or 128 + 64 + … + 2 + 1 (decimal) or 255. Altogether, this approach allows us to store the integers 0 through 255, inclusive, for an 8-Bit number or byte; and we can conclude that one byte of data can take on 256 different values. Of course, this range is adequate for some data storage purposes in computers, but not for others. The 8-Bit number with a range of 256 alternatives will arise several times later in this chapter and throughout the book. - eBook - PDF
Explorations in Computing
An Introduction to Computer Science and Python Programming
- John S. Conery(Author)
- 2014(Publication Date)
- Chapman and Hall/CRC(Publisher)
Chapter 8 Bit by Bit Binary codes and algorithms for text compression and error detection Computer systems use a variety of technologies to store and transmit data. Processor and memory chips are based on semiconductor technology; disks are made from magnetic ma-terials spread over the surface of a thin, circular plate; removable disks have a reflective surface with tiny pockmarks that are detected by lasers; digital cameras and cell phones store digital information in “flash” memories that retain their data even when the device is turned off; networks transfer information in the form of light waves over fiber-optic cables. As diverse as these technologies are, they have one thing in common that allows them to be used to store or transmit information: they are physical devices that can be set to one of two different states. A semiconductor memory cell will be in a state where we can measure one of two different voltage levels, or a section of a DVD will be smooth or have an indentation, which can be detected by a laser scanning the surface of the disc. Exactly how the two states are managed physically is in the realm of computer engineer-ing, or, as programmers like to say, is “a hardware problem.” The role of computer science is to figure out how to represent information in a form that can be stored or transmitted using these technologies. The starting point is to use two symbols to stand for the two different states. Traditionally, the symbols are 0 and 1 , the digits of the binary number system. Engineers designing a memory system decide what voltage levels will be used inside memory chips, and we can assign the symbol 1 to a level of 3.5 volts and the symbol 0 to a level of 0 volts. Computer scientists figure out how to represent text and other information as a sequence of binary symbols and devise algorithms that manipulate these symbols. A variety of real-world objects, things like pieces of text from a book, images captured by a camera, or sounds 249 - eBook - PDF
- Henry M. Walker(Author)
- 2012(Publication Date)
- Chapman and Hall/CRC(Publisher)
In a typical binary machine, a common convention is that any voltage from 0 to 1.3 volts is interpreted as the digit 0, whereas voltages above 1.7 volts represent the digit 1. Having a range of voltages allows circuits to accommodate variations of voltage that may arise natu-rally. (Circuits are designed to avoid voltages between 1.3 and 1.7 volts. These intermediate voltages might be hard to interpret so such voltages may be considered errors.) With no other choices regarding possible digit values, processing can utilize simple and cheap on/ off circuits. Technically, a single 0 or 1 is called a Bit of information. Such a data element is sufficient to hold the answer to a yes/no or true/false question, but a single Bit is inadequate to store EXAMPLE: INTERPRETING THE DECIMAL INTEGER 36,428 In the decimal system, the location of each digit has a label (a power of 10) that indicates the relative weight of the digit Decimal number 3 6 4 2 8 ↑ ↑ ↑ ↑ ↑ Label 10,000 1000 100 10 1 (Or power of 10) 10 4 10 3 10 2 10 1 10 0 Place value (decimal number times label) 3 ∙ 10,000 6 ∙ 1000 4 ∙ 100 2 ∙ 10 8 ∙ 1 Number’s value 36,428 = 30,000 + 6000 + 400 + 20 + 8 36 ◾ The Tao of Computing more general information. Thus, in a binary system, several Bits typically are grouped together in various size units, so that they can hold greater information. A particularly common grouping involves 8 Bits and is called a byte . To see how natural numbers, the integers staring with 0 and going higher, can be stored in a byte, consider the following number scheme. (If you know about the binary system, this will seem quite familiar.) Note that there are eight columns, or place values, because this is an 8-Bit number. The placement of each 0 and 1 influences their value. To convert a binary number into a decimal number, start at the right of a sequence of 0s and 1s, and label the digits with a power of 2. Then add the labels corresponding to where the digit 1 appears in the sequence. - eBook - ePub
Numbers
Arithmetic and Computation
- Asok Kumar Mallik, Amit Kumar Das(Authors)
- 2022(Publication Date)
- CRC Press(Publisher)
Chapter 6 Computer and programming fundamentalsWe are now in a position to appreciate the potential of different types of numbers and their applications in describing real-life problems and their solutions. It is also expected that you might be eager to use a computer for solving some problems. Computers would be handy not only to save time, but to relieve you from the drudgery of manual computation as well. Last but not the least, computers may be a big help if you could not obtain an analytical solution.Here we will learn about the following, with the final goal of solving some of the problems presented in this book without the rigorous analytical acumen required otherwise.- How the numbers and codes are represented in computers.
- Logic operations and logic gates.
- How arithmetic and logic operations are done in a computer.
- A Programming language with a tutorial introduction to programming in a concise form.
6.1 Advantages of binary representation of numbers
In a computer the numbers are represented in binary. In fact, not only the numbers, the instruction or any other information is nothing other than some 0’s and 1’s stored in the memory, the main resource of the computer. A switch with its two states, namely, OFF and ON is the simplest possible 2-state device that be used to represent 0 and 1. So, a few switches together, say 8, may be used to represent a 8-Bit binary number (b7 b6 ,…, b0 ) 000000002 to 111111112 ; i.e. 0 to 255 in decimal. Additionally, the ON and OFF states of the switches can be mapped to TRUE and FALSE in the logical domain. This is very important as the computer relies on logic operations as we shall see next.In short, if we choose to represent a number in decimal form, the computing system should be able to represent and identify 10 different states; 0 to 9 and carry out all arithmetic operations using 10-state devices. This leads to a complicated, costly and bulky solution. World’s first electronic computer ENIAC (1946), designed and installed in the University of Pennsylvania, USA used decimal representation of numbers. Moreover, transistors and ICs were not invented then and it was built using electronic valves. ENIAC weighed 27 tons, occupied 18,000 sq. ft. and consumed ONLY 150 KW of electricity.
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.









