Computer Science

Binary Number System

The binary number system is a base-2 numeral system used in computers, which represents numbers using only two digits: 0 and 1. In this system, each digit's place value is a power of 2, making it well-suited for electronic systems that use on/off states to represent data. Binary numbers are fundamental to digital computing and are used in various computer operations and programming languages.

Written by Perlego with AI-assistance

8 Key excerpts on "Binary Number System"

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.
  • Electronics Explained
    eBook - ePub

    Electronics Explained

    The New Systems Approach to Learning Electronics

    • Louis E. Frenzel(Author)
    • 2010(Publication Date)
    • Newnes
      (Publisher)

    ...The symbols 0 and 1 are called binary digits or bits. For example, the 6-bit number 101101 represents the decimal number 45. Your understanding of how digital circuits, microprocessors, and related equipment process data is tied directly to an understanding of the Binary Number System. The reason for using binary numbers in digital equipment is the ease with which they can be implemented. The electronic components and circuits used to represent and process binary data must be capable of assuming two discrete states to represent 0 and 1. Examples of two-state components are switches and transistors. When a switch is closed or on, it can represent a binary 1. When the switch is open or off, it can represent a binary 0. A conducting transistor may represent a 1, whereas a cut-off transistor may represent a 0. The representation may also be voltage levels. For example, a binary 1 may be represented by +3.3 V and a binary 0 by 0 V as previously shown in Figure 5.1. Binary-to-decimal Conversions The binary system is similar to the decimal system in that the position of a digit in a number determines its weight. Recall that in the decimal system the weights are powers of 10. The right-most digit is units or 1’s, and then 10’s, 100’s, 1000’s, and so on, moving from right to left from one digit to the next. The position weights of a binary number are powers of 2: 2 0 = 1 2 1 = 2 2 2 = 4 2 3 = 8 2 4 = 16 2 5 = 32 2 6 = 64 2 7 = 128 2 8 = 256 The position weights of an 8-bit binary number follow: The most significant digit or bit (MSB) and the least significant bit (LSB) are identified. Now let’s evaluate the decimal quantity associated with a given binary number, 101101. You simply multiply each bit by its position weight and add the values to get the decimal equivalent, 45. You can see that positions with a 0 bit have no effect on the value. Therefore, they can be ignored...

  • Digital Design
    eBook - ePub

    Digital Design

    Basic Concepts and Principles

    • Mohammad A. Karim, Xinghao Chen(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...

  • Introduction to Digital Electronics

    ...2 Arithmetic and digital electronics 2.1 INTRODUCTION Many of the applications of digital electronic circuits involve representing and manipulating numbers as binary code (i.e. O’s and l’s). For instance in order to input any analogue value (e.g. a voltage or temperature) into a digital circuit it must be first encoded as a binary value, whilst subsequent arithmetic performed on such an input must be carried out by further digital circuits. The way in which some arithmetic operations are implemented as digital electronic circuits is considered in the next chapter. Here, as a prelude to this, some of the many ways in which numbers can be represented as binary code are introduced, followed by a description of how to perform binary arithmetic; that is addition, subtraction, multiplication and division on numbers represented only by O’s and l’s. 2.2 BASES-2, 10 AND 16 (BINARY, DECIMAL AND HEXADECIMAL) Numbers are most commonly represented using the 10 digits 0 to 9, that is in base-10 (or decimal). This widespread use is linked to our possession of 10 fingers and their value as a simple counting aid. However, from a purely mathematical viewpoint the base system used for counting is unimportant (indeed before metrification in Europe (use of base-10 in all weights and measures) many other bases were common). In digital electronics the only choice of base in which to perform arithmetic is base-2, that is binary arithmetic, using the only two digits available, 0 and 1. 1 Before continuing it is necessary to consider how to convert numbers from one base to another. 2.2.1 Conversion from base- n to decimal In order to do this it is essential to realise what a number expressed in any base actually represents. For example the number 152 10 in base-10 represents 2 the sum of 1 hundred, 5 tens and 2 units giving 152 10 units...

  • Understanding Forensic Digital Imaging
    • Herbert L. Blitzer, Karen Stein-Ferguson, Jeffrey Huang(Authors)
    • 2010(Publication Date)
    • Academic Press
      (Publisher)

    ...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 10 2 plus 2 times 10 1 plus 3 times 10 0. 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 1011 2 or 1011 B are both binary numbers...

  • Programmable Logic Controllers
    • William Bolton(Author)
    • 2011(Publication Date)
    • Newnes
      (Publisher)

    ...3 Number systems The number system used for everyday calculations is the denary or decimal system. This is based on the use of the 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. With a number represented by this system, the digit position in the number indicates the weight attached to each digit, the weight increasing by a factor of 10 as we proceed from right to left. Hence we have: Counting can, however, be done to any base. The denary system is just convenient because we have ten fingers. If we had only two then our system for everyday counting would probably have been different. Computers, and hence PLC systems, are based on counting in twos because it is convenient for their system, their two digits being effectively just the off and on signals. When working with PLCs, other base number systems are also used, e.g. input and output addresses are often specified using the octal system, i.e. base 8. 3.1 The binary system The binary system is based on just two digits: 0 and 1. These are termed binary digits or bits. When a number is represented by this system, the digit position in the number indicates the weight attached to each digit, the weight increasing by a factor of 2 as we proceed from right to left. The bit 0 is termed the least significant bit (LSB) and the highest bit the most significant bit (MSB). For example, with the binary number 1010, the least significant bit is the bit at the right-hand end of the number and so is 0. The most significant bit is the bit at the left-hand end of the number and so is 1. When converted to a denary number we have, for the 1010: Thus the denary equivalent is 10. The conversion of a binary number to a denary number thus involves the addition of the powers of 2 indicated by the number. The conversion of a denary number to a binary number involves looking for the appropriate powers of 2. We can do this by successive divisions by 2, noting the remainders at each division. Thus with the denary number 31: The binary number is 11111...

  • Programmable Logic Controllers
    • William Bolton(Author)
    • 2009(Publication Date)
    • Newnes
      (Publisher)

    ...The hexadecimal system is based on the use of 16 digits: 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. The binary coded decimal (BCD) system has each denary digit coded separately into binary. For the addition of two binary numbers, we have 0 + 0 = 0, 0 + 1 = 1, and 1 + 1=10. For subtraction, we have 0 – 0 = 0, 1 – 0 = 1, and 1 – 1 = 0. Binary numbers that give no indication of whether they are negative or positive are termed unsigned. When a number is signed, the most significant bit indicates the sign of the number—0 if positive and 1 if negative. A binary number has two complements. The one's complement is obtained by changing all the 1s in the unsigned number into 0s and the 0s into 1s. The two's complement is obtained from the one's complement by adding 1 to the least significant bit. When we have a negative number, the signed two's complement number is obtained signing the two's complement with a 1. A floating point number is in the form a × r e, where a is termed the mantissa, r the radix or base, and e the exponent or power. With binary numbers the base is understood to be 2, that is, we have a × 2 e ; when we know we are dealing with binary numbers we need not store the base with the number. Thus a computing system needs, to store the mantissa and the exponent in addition to storing the sign, whether positive or negative. Most PLCs operate with a 16-bit word, the term word being used for the group of bits constituting some information. Signed numbers are referred to as integers, with the symbol INT used with inputs and outputs in programs of such 16-bit words. SINT is used for short integer numbers where only 8 bits are used; DINT refers to double-integer numbers for which 32 bits are used. LINT is used for long integer numbers where 64 bits are used...

  • Microprocessor Technology
    • J S Anderson(Author)
    • 2012(Publication Date)
    • Routledge
      (Publisher)

    ...Chapter 2 Binary maths and number systems The decimal system The decimal system is so called because there are ten digits available, 0 to 9. All other numbers in the system are made up of combinations of these. (Dec means 10 as in decade – 10 years, December – 10th month (July and August have been added) and decathlon – 10 events, etc.) A number like 255 really means: 100s 10s Units 2 5 5 We can recognise 255 instantly because we are used to using decimal numbers, but in the binary system, 255 would be written as: 1111 1111. This is not so recognisable (unless we are used to it) although we could easily work it out. Similarly, we could work out the value of 255: In ‘index’ notation (powers of 10) the column headings are: 10 3 10 2 10 1 10 0 (1000s) (100s) (10s) (Units) 4 5 2 7 i.e. (Remember, incidentally, that x 0 = 1, whatever the value of x.) Table 2.1 Decimal numbers 0 to 64 with their binary equivalents. Note how the convention of writing the numbers in groups of four is adhered to. (They're easier to read like this and each group of four can be represented by a single hexadecimal digit as we shall see later.) Frequently, the leading zeros are also written down, e.g. 62D would be written as 0011 1110. This is how it would appear in a CPU register or memory location Decimal Binary Decimal Binary 0 0 33 10 0001 1 1 34 10 0010 2 10 35 10 0011 3 11 36 10 0100 4 100 37 10 0101 5 101 38 10 0110 6 110 39 10 0111 7 111 40 10 1000 8 1000 41 10 1001 9 1001 42 10 1010 10 1010 43 10 1011 11 1011 44 10 1100 12 1100 45 10 1101 13 1101 46 10 1110 14 1110 47 10 1111 15 1111 48 11 0000 16 1...

  • Programmable Logic Controllers
    • William Bolton(Author)
    • 2015(Publication Date)
    • Newnes
      (Publisher)

    ...Chapter 3 Digital Systems Abstract In this chapter the various number systems are looked at, namely denary, binary, octal, hexadecimal and binary coded decimal. Binary arithmetic is developed. Combinational and sequential logic systems are introduced. Keywords Denary binary octal hexadecimal and binary coded decimal number systems logic systems Digital systems work with inputs, which are essentially just off/on signals, with the two signal levels represented by 0 and 1. These are termed binary digits. The number system used for everyday calculations is the denary or decimal system. This is based on the use of 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. With a number represented by this system, the digit position in the number indicates the weight attached to each digit, the weight increasing by a factor of 10 as we proceed from right to left. Hence we have: 10 3 10 2 10 1 10 0 Thousands Hundreds Tens Units Denary 1000 100 10 1 Thus if we have the denary number 1234, we have 1 with a place value of 10 3, 2 with a place value of 10 2, 3 with a place value of 10 1, and 4 with a place value of 10 0. Counting can, however, be done to any base. The denary system is convenient mainly because we have 10 fingers. If we had only two fingers, our system for everyday counting would probably have been different. Computers, and hence PLC systems, are based on counting in twos because it is convenient for their systems, their two digits being effectively just the off and on signals. When working with PLCs, other base number systems are also used; for example, input and output addresses are often specified using the octal system, that is, base 8. However, the PLC itself works with binary numbers. In this chapter we take a look at the various number systems. We also take an introductory look at logic systems. A Combinational logic systems take binary inputs and combine them to give a binary output. The relationship between the inputs and the output can be described by truth tables...