Computer Science

Binary Conversion

Binary conversion is the process of converting numbers or data from a decimal (base-10) system to a binary (base-2) system. In computer science, this is essential for representing and processing data in digital systems. It involves breaking down numbers into their binary equivalents, which consist of only 0s and 1s, and is fundamental to understanding how computers store and manipulate information.

Written by Perlego with AI-assistance

3 Key excerpts on "Binary Conversion"

  • Network Technology for Digital Audio
    • Andy Bailey(Author)
    • 2013(Publication Date)
    • Routledge
      (Publisher)
    The normal every day numbering system is based on ten numbers (0 to 9) and is called decimal, or base-10. The mathematics surrounding the numbering system based on only two numbers is called binary or base-2.
    Binary numbering systems use 1 and 0 as the two states, and this translates electrically so that 1 represents on and 0 represents off. It is also perfectly acceptable for 1 to represent off and 0 to represent on, but the former assignments are used most commonly.
    Once binary information has been represented in this way, it is possible to use a series of switches to perform complex mathematical operations upon the numbers, by operating the switches according to the rules laid out by the mathematical, or logical, operation.
    1.1.1  Binary and Hex
    Any number can be represented in binary, since if a number is equal to more than 1, then it is carried forward, in the same way as elementary decimal addition for the decimal numbering system. Obviously, the amount of times the carrying forward occurs is likely to be higher, since writing down the number 2 would be the first whole number that requires this to happen, and would be represented as 1 0 (see Figure 1.1 ).
    Figure 1.1  Binary mathematics. In everyday decimal mathematics, numbers are represented as rows of numbers, each row representing a power of the base number (1, 10, 100, 1000) and so on. Binary mathematics can also be represented as columns of numbers, incrementing by a power of 2 (1, 2, 4, 8, 16 and so on).
    By using electrical voltages and switches, computing devices have been able to make valuable use of binary representation of numbers. All computer data in its most basic form are made up of binary digits. As might be expected from the impressive rate of development of computer technology, the binary method of representing information comes with a complete set of jargon.
    In binary digital devices, the most common methods for representing bi-states include voltage differences, magnetic polarity, or the intensity of light.
    A single bi-state position (either a 1 or a 0) is called a bit, from BInary digiTs. Bits are grouped together to form ‘words’. It is common practice in computing to group 8 bits together to form an 8-bit word length. An 8-bit word is called a byte and is something that was settled on through trial-and-error and due to the limitation of early computer designs, and has been around for over fifty years.
  • Understanding Forensic Digital Imaging
    • Herbert L. Blitzer, Karen Stein-Ferguson, Jeffrey Huang(Authors)
    • 2010(Publication Date)
    • Academic Press
      (Publisher)
    FIGURE 12.2 Digital signal (square wave function in green) has less degradation than analog signal (sine wave function in blue). Using digital signal for communication can prevent signal drifts.

    DATA REPRESENTATION IN DIGITAL SYSTEMS

    One important aspect of digital system design is how information ultimately will be converted into a bit pattern. Numeric values are the most prevalent and natural type of data representation from an analog source. When converting numeric information to binary codes, it is necessary to have a good mapping strategy, so that the data can be well represented relative to how it will be used. Numeric information can be categorized into three data types:
     Integer
     Negative value
     Floating point representation
    This section discusses the representation of these three data types.

    Integer Representation: Decimal versus Binary or Hexadecimal

    To introduce binary data representation, it is useful to dissect the more common decimal system we all know. The decimal number 123 is based on powers of 10 (hence the term decimal, from the Latin for ten). It is really 1 times 102 plus 2 times 101 plus 3 times 100 . or 1 * 100 + 2 * 10 + 3 * 1 = 100 + 20 + 3 = 123. Each place holder is multiplied by 10 raised to a power consistent with its place in the string of digits, and the value in each place holder can be any whole number between zero and 9. The powers of 10 increase by one, going up from zero, as one progresses to the left. Similar rules apply in the binary system but the values are different. Each place holder is multiplied by 2 raised to some power, and the value in each place holder can be any whole number between zero and one. The powers of 2 increase by one, going up from zero, as one progresses to the left.
    Binary is represented by only zeros and ones. A binary pattern (number) can be converted to a decimal number and a decimal number can be converted to binary. The binary number system is sometimes called the base-2 system, and base might be indicated by 2, b, B, or Bin. So 10112 or 1011B
  • Cybercrime and Information Technology
    eBook - ePub

    Cybercrime and Information Technology

    Theory and Practice: The Computer Network Infostructure and Computer Security, Cybersecurity Laws, Internet of Things (IoT), and Mobile Devices

    • Alex Alexandrou(Author)
    • 2021(Publication Date)
    • CRC Press
      (Publisher)
    Figure 1.5 ).
    FIGURE 1.5 A research to improve the human–computer interface, c1966. MAGIC (Machine for Automatic Graphics Interface to a Computer) Photograph from NIST Digital Archives.

    Understanding Binary Data

    Human languages use characters or symbols, letters and images to signify meaning. These characters are unintelligible to the wires and circuits within the computer. The computer does not act as we do; instead, it stores values as electrical charges. More specifically, when electricity flows through a wire, the electrical signal can be represented as either 1 or 0, True or False, Yes or No, or On or Off. Figure 1.6 demonstrates the binary representation of an image.
    FIGURE 1.6 The Binary representation of an image.
    The 0 or 1 is referred to as a bit (short for binary digit), and is the smallest unit of information. The more electrical connections the computer uses, the more bits are flowing through its system.
    While a bit can represent only a 0 or a 1, a byte, a collection of exactly 8 bits, represents a unique character. Table 1.1 and Figure 1.7 demonstrate the possible patterns or states of 0s and 1s that can be made from 1, 2, 3 and 4 bits.
    TABLE 1.1 Bits and Their Possible Patterns
    Bits Possible Patterns
    1 bit (2 possible values) 0 or 1
    2 bits (4 values) 00 01 10 11
    3 bits (8 values) 000 001 010 011 100 101 110 111
    FIGURE 1.7 Bits possible patterns.
    To be able to represent more than 1 and 0, True/False, Yes/No, or On/Off, we collect 8 bits to form 1 byte. With 1 byte we can represent and store the numbers between 0 and 255 (28 ). Therefore, a single byte can represent up to 256 different values.
    By arranging bits into bytes, any number up to 255 can be represented using only 0s and 1s. Overall, each additional bit doubles the number of possible patterns (Table 1.2
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.