Physics

Binary Representation

Binary representation is a method of representing numbers using only two digits, 0 and 1. In computing and digital systems, binary representation is used to store and process data. It is based on the binary number system, where each digit's place value is a power of 2. This system is fundamental to the operation of digital electronics and computer systems.

Written by Perlego with AI-assistance

10 Key excerpts on "Binary Representation"

  • Book cover image for: Programming with C++
    • Kyla McMullen, Elizabeth Matthews, June Jamrich Parsons, , Kyla McMullen, Kyla McMullen, Elizabeth Matthews, June Jamrich Parsons(Authors)
    • 2021(Publication Date)
    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.
  • Book cover image for: Systems Architecture
    Basing computer processing on mathematics and physics has limits, however. Process-ing operations must be based on mathematical functions, such as addition and equality comparison; use numerical data inputs; and generate numerical outputs. These process-ing functions are sufficient when a computer performs numeric tasks, such as accounting or statistical analysis. When you ask a computer to perform tasks such as searching text documents and editing sound, pictures, and video, numeric-processing functions do have limitations, but ones that modern software has largely overcome. However, when you want to use a computer to manipulate data with no obvious numeric equivalent—for example, literary or philosophical analysis of concepts such as “mother,” “friend,” “love,” and “hate”—numeric-processing functions have major shortcomings. As the data you want to process moves further away from numbers, applying computer technology to processing the data becomes increasingly difficult—and less successful. Binary Data Representation In a decimal (base 10) number, each digit can have 1 of 10 possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. In a binary number , each digit can have only one of two possible values: 0 or 1. Computers represent data with binary numbers for two reasons: • Binary numbers represented as binary electrical signals can be transported reliably between computer systems and their components (discussed in detail in Chapter 8). • Binary numbers represented as electrical signals can be processed by two-state electrical devices that are easy to design and fabricate (discussed in detail in Chapter 4). For computer applications to produce accurate outputs, reliable data transport is important. Given current technology, binary signals and processing devices represent the most cost-efficient tradeoffs between capacity, accuracy, reliability, and cost.
  • Book cover image for: Invitation to Computer Science
    This is a much more reliable way to represent information inside a computer. For example, if we use binary rather than decimal to store data in our hypothetical electronic device that stores voltages in the range from 0 to 1 45 volts, the representational scheme becomes much simpler: 0 volts = 0 (full off) + 45 volts = 1 (full on) Now a 6% or even a 12% drift doesn’t affect the interpretation of the value being represented. In fact, it takes an almost 50% change in voltage level to create a problem in interpreting a stored value. The use of binary for the internal representation of data significantly increases the inherent reliability of a computer. This single advantage is worth all the time it takes to convert from decimal to binary for internal storage and from binary to decimal for the external display of results. 4.2.4 Binary Storage Devices As you learned in the previous section, binary computers can be built out of any bistable device. This idea can be expressed more formally by saying that it is possible to construct a binary computer and its internal components using any hardware device that meets the following four criteria: 1. The device has two stable energy states (one for a 0, one for a 1). 2. These two states are separated by a large energy barrier (so that a 0 does not accidentally become a 1, or vice versa). Copyright 2019 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. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 178 Chapter 4 The Building Blocks: Binary Numbers, Boolean Logic, and Gates 3.
  • Book cover image for: The Tao of Computing
    How Are Numbers and Characters Represented in a Computer (and Who Cares)? ◾ 37 As binary numbers provide an effective way to represent data in computers, this approach is widely used. Data stored this way is often said to be digital . What other approaches can be used to store data, in addition to “digital” data? When we first discussed the representation of data in the previous question, we men-tioned two main approaches for representing numbers. The first approach, using digital storage, involved binary digits: 0 and 1. In this approach, data (e.g., numbers) were trans-lated into a sequence of 0s and 1s (e.g., the decimal number 77 was represented as the binary number 01001101). Within electrical equipment, a 0 might be translated to a cir-cuit with no voltage or electrical current, and a 1 might be translated to a circuit in which current was flowing or voltage was set above 1.7 volts. This approach is called a digital representation of data. The second approach involved using a continuous range of voltages or currents to represent a decimal digit. On a 9-volt system, 9 volts might represent the decimal digit 9, 8 volts might represent the decimal digit 8, etc. This approach, called an analog representation of data, relates the size of a quantity to a voltage, an amount of current, or some other physical trait. To illustrate this further, a traditional thermometer consists of a hollow glass tube con-taining a fluid (often red). When the temperature in a room increases, the fluid expands, and the top of the fluid moves up the tube. Temperature is then determined by measuring the top of the fluid. When a calibration scale is added to the glass tube, the result is a tra-ditional thermometer; and this approach illustrates an analog measuring device. Similarly, in a classroom, a light switch might have a slider or dial; moving the slider or knob changes continuously the intensity of the lights up or down.
  • Book cover image for: Developing Windows-Based and Web-Enabled Information Systems
    • Nong Ye, Teresa Wu(Authors)
    • 2014(Publication Date)
    • CRC Press
      (Publisher)
    19 2 Digital Data Representation This chapter describes how numbers, characters, and other forms of information are repre-sented on computers using binary data. Some methods of detecting and correcting errors in data storage and transmission are also given in this chapter. 2.1 Representation of Numbers In this section, we first introduce the conversion between decimal numbers and binary numbers for unsigned numbers. We then give the representation of signed numbers. An unsigned number is a number without the negative sign. A memory address is an unsigned integer on computers. A signed number has a positive or a negative sign. Data used in computation are typically declared as signed numbers on computers. 2.1.1 Conversion between Unsigned Binary and Decimal Numbers A decimal number has a base of 10 and digit values of 0, 1, 2, …, 9. A binary number has a base of 2 and digit values of 0 and 1. The representation of a decimal number and a binary number using their base is given as follows: Decimal number: 123.45 10 = 1 × 10 2 + 2 × 10 1 + 3 × 10 0 + 4 × 10 −1 + 5 × 10 −2 Binary number: 101.01 2 = 1 × 2 2 + 0 × 2 1 + 1 × 2 0 + 0 × 2 −1 + 1 × 2 −2 The conversion of an unsigned binary number to a decimal number is carried out by computing the sum using the base representation of the binary number, as shown: 101.01 2 = 1 × 2 2 + 0 × 2 1 + 1 × 2 0 + 0 × 2 −1 + 1 × 2 −2 = 4 10 + 0 10 + 1 10 + 0 10 + 0.25 10 = 5.25 10 We use the decimal number system in our daily activities. An unsigned decimal number must be represented on computers using a binary number that is supported by computer hardware. A binary integer with N binary digits (called “bits”) can represent an unsigned decimal integer from 0 to 2 N − 1. For example, the decimal integers from 0 to 15 can be rep-resented by 4-bit binary numbers, as shown in Table 2.1. One method of converting an unsigned decimal number to a binary number is the repeated subtraction method, which has the following steps: 1.
  • Book cover image for: Digital Computer Structure and Design
    This implies a natural preference for binary devices, and thus the binary number system has been generally adopted for computer arithmetic. It can also be shown that the binary system is the most efficient way of storing and representing numbers. In binary arithmetic units the same type of logic devices can be used as in the control 70 Number Representation in Computers system, so that they are ubiquitous throughout the machine. There have been attempts to introduce decimal counting devices, but these have not been successful because they were special only to the arithmetic unit, as well as being more inefficient. A binary integer is therefore represented in the form α η α η _γ. . . . α4α 3 α 2 αια θ9 where the coefficients a 0 , a x , etc. may be either 1 or 0, and in the computer it would appear as: Binary integer X XXX XX a n #4 a$ a 2 #i a 0 where X can be either 1 or 0. binary point here A positive binary fraction would appear within the computer as: Binary fraction X X X X X X 0-1 Ä-2 0-3 0-4 0-5 <*-n binary point here Binary numbers are added in a similar way to decimal numbers, but the sum for each digit can be only 1 or 0, and there is a carry to the next higher digit if the sum in that position is greater than 1. This can be summarised in a table for two binary digits A and B and a carry from the previous position. A B Carry from next lower position Sum Carry out to next higher position As an example we have: 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 Suml 1 0 0 0 0 1 1 The term binary digit has been abbreviated to 'bit' throughout the Computerworld. Decimal Codes Whatever base it may be decided to use for calculation within the computer, we are faced with the fact that in the outside world human Number Representation in Computers 71 beings prefer to think and work with numbers represented in decimal, or perhaps in one of the other units of weights and measures.
  • Book cover image for: Digital Design
    eBook - ePub

    Digital Design

    Basic Concepts and Principles

    • Mohammad Karim, Xinghao Chen, Mohammad A. Karim(Authors)
    • 2017(Publication Date)
    • CRC Press
      (Publisher)
    Two-valued discrete systems, in particular, are referred to as binary systems. Both the inputs and outputs in binary systems can assume either of two allowable discrete values. By combining such discrete states, one may represent numbers, characters, codes, and other pertinent information. There are several advantages that binary systems have over the corresponding analog systems. The electronic devices used in digital circuits are extremely reliable, inexpensive, and remarkably consistent in their performances so long as they are maintained in either of two logical states. Also, because binary circuits are maintained in either of two allowable states, they are much less susceptible to variations of environment and have tolerable accuracy. Number systems provide the basis for quantifying information for operations in digital processing systems. The binary (two-valued) number system, in particular, serves as the most important basis for understanding digital systems since the electronic devices involved can assume only two output values. In this chapter, we shall study the binary number system, its relationship with other number systems, and then show how they can be represented in binary coded form. Many of these other number systems are of relevance to optical and quantum computing systems that are currently under development. In Chapter 5, an introduction to computer-aided design (CAD) systems is provided so that it can be used by students. Before that, in Chapter 2, we shall describe interactions of various system variables in terms of logical operations. Logical operations describing the desired outputs of the to-be-designed system in terms of the inputs allow us to explore the various design strategies that can be employed for designing the system in question. 1.2 Positional Number Systems The number system that is routinely used by us is the base-10 or decimal system
  • Book cover image for: Computer Systems Architecture
    Such a system that has already been mentioned was the Hollerith punched card, which used the holes in the card to represent data. The fast development of the Internet and the fact it is a global system required spe-cial attention to data representation standards. These standards provide the basic platform for data transfers between all connected devices. Furthermore, since all modern comput-ers use the binary system, the standards have to define the Binary Representation of data as well. This data may include numbers (integers, real and complex numbers), text, and special symbols. An important aspect of the representation system applicable to num-bers is its ability to support computations (as will be explained in the section “Computer’s Arithmetic” in this chapter). 48 ◾ Computer Systems Architecture Numerical Systems From the dawn of history, humans needed a mechanism that would allow the measurement of quantities. As such, basic verbal communication was developed to include a system to quantify size. Over the years, various civilizations have developed numerous such numeri-cal systems, used originally for counting and later for computations as well. Such numeri-cal systems are a prerequisite for data representation, since first the system has to be put in place and only later is its representation defined. Every numerical system has to use symbols (numerals) for representing quantities. A delicate balance regarding the number of the symbols used as the numeric system has to be maintained. On one hand, the number of symbols should be relatively small, so it will be easier for humans to remember and use the system. On the other hand, it should not be too small, as this would require long representation (or many numerals, as will be elaborated on and explained in the section “Binary System” in this chapter). The system, of course, should be able to cover the whole spectrum of numbers (i.e., be infinite).
  • Book cover image for: The Silicon Web
    eBook - PDF

    The Silicon Web

    Physics for the Internet Age

    • Michael G. Raymer(Author)
    • 2009(Publication Date)
    • CRC Press
      (Publisher)
    It makes no sense to tell someone you will pay him “1,000” to mow your lawn. The unit you prob-ably meant to specify is cents . Physicists like to use nicknames for familiar quantities, such as kilo for 10 3 . Calculations involving units are made simple by using conversion factors. This is akin to converting currency from, say, dollars to euros. Number systems are founded on counting. We discussed the base-ten and base-two counting systems and how to convert between them. Computers use the base-two or binary counting system. This is appropriate, because for storing numbers computers use memory cells that can store only one of two possible symbols, called 1 and 0. A binary digit or bit is a number that can take on only one of two possible values, 1 and 0. This means that each memory cell can store 1 bit. The amount of information that can 10 20 30 40 Years Number of rabbits 50 0 10 15 10 1 10 3 10 5 10 7 10 9 10 11 10 13 FIGURE 2.9 Exponential growth, plotted as the exponent of the number on the vertical axis (a log plot). Mathematics 43 be stored in a computer memory equals the number of memory cells. This equals the number of bits that can be stored. In Shannon’s 1948 paper, he explained a mathematical way to analyze information traveling in communication systems such as telephone lines. As we will discuss in later chapters, Shannon’s theory answered two main questions: How strongly can a mes-sage (or other data) be compressed without losing information? How much information (data) can a communication channel (such as a wire) transmit each second without errors occurring? These are important questions in the context of sending compressed data files, such as text, music, or video, across the Internet. In the next several chapters, we will study the areas of physics called mechanics, heat, and electromagnetism. These so-called classical areas of physics were discovered and explored during the period leading up to around 1900.
  • Book cover image for: The Tao of Computing
    digital.

    What other approaches can be used to store data, in addition to “digital” data?

    When we first discussed the representation of data in the previous question, we mentioned two main approaches for representing numbers. The first approach, using digital storage, involved binary digits: 0 and 1. In this approach, data (e.g., numbers) were translated into a sequence of 0s and 1s (e.g., the decimal number 77 was represented as the binary number 01001101). Within electrical equipment, a 0 might be translated to a circuit with no voltage or electrical current, and a 1 might be translated to a circuit in which current was flowing or voltage was set above 1.7 volts. This approach is called a digital representation of data.
    The second approach involved using a continuous range of voltages or currents to represent a decimal digit. On a 9-volt system, 9 volts might represent the decimal digit 9, 8 volts might represent the decimal digit 8, etc. This approach, called an analog representation of data, relates the size of a quantity to a voltage, an amount of current, or some other physical trait.
    To illustrate this further, a traditional thermometer consists of a hollow glass tube containing a fluid (often red). When the temperature in a room increases, the fluid expands, and the top of the fluid moves up the tube. Temperature is then determined by measuring the top of the fluid. When a calibration scale is added to the glass tube, the result is a traditional thermometer; and this approach illustrates an analog measuring device. Similarly, in a classroom, a light switch might have a slider or dial; moving the slider or knob changes continuously the intensity of the lights up or down. These types of light switches are called dimmer switches
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.