Computer Science

Numeral Systems

Numeral systems are methods of representing numbers using symbols. In computer science, the most commonly used numeral systems are binary (base-2), decimal (base-10), and hexadecimal (base-16). Binary is fundamental in digital systems, representing data using only two symbols (0 and 1). Decimal is the standard system for human use, while hexadecimal is widely used in computing for its compact representation of binary data.

Written by Perlego with AI-assistance

12 Key excerpts on "Numeral Systems"

  • Scientific Programming: C-language, Algorithms And Models In Science
    eBook - ePub
    • Luciano Maria Barone, Enzo Marinari, Giovanni Organtini, Federico Ricci Tersenghi(Authors)
    • 2013(Publication Date)
    • WSPC
      (Publisher)
    PART 1 Basic programming in C language Passage contains an image Chapter 1 Numbers and non-numbers Novem figure indorum hae sunt 9 8 7 6 5 4 3 2 1 Cum his itaque novem figuris, et cum hoc signo 0, quod arabice zephirum appellatur, scribitur quilibet numerus, ut inferius demonstratur.
    Fibonacci, Liber Abaci (1202).
    In this chapter we show how to represent data (whether numerical or not) in the computer memory. The first step towards the creation of an automatic data manipulating machine is representing the information. The basic information, especially in case of scientific computation problems, consists of numbers. The representation of data of any other nature (characters, images, sounds, etc.) is based on that of numbers. Therefore, a considerable part of this chapter is dedicated to the ways of representing the latter.
    1.1Numeral Systems
    A numeral system is the set of rules determining how to graphically express numbers.
    We need to distinguish between the abstract concept of number and the symbol representing it: symbols are called numerals. The number five, e.g., can indeed be written in various ways: 5 in Arab characters (those com-monly used) or V in Roman numbers; Maya represented it as a horizontal dash —; the ancient Greeks as Π and so on. Whichever symbol is chosen, the number remains the same.
    The first ingredient of a numeral system is a finite number of symbols or characters. These are then combined in different ways such that all numbers, which on the contrary are infinite, can be written. These characters are called digits. A numeral system also defines the digit composition rules and their sequence.
    In the decimal numbering system there are 10 digits (from 0 to 9), and the number sequence is as following:
    The first sequence is obtained by writing all available digits in a given, arbitrary, order (the first line of the series). Subsequently, this sequence is repeated while placing the number of repetitions before each digit. In this way 12 corresponds to the number obtained by counting all digits from 0 to 9 a first time and, next, repeating the digits up to number 2 one more time; 24 corresponds to the number obtained by counting up to 2 repetitions of the digit sequence, stopping at the number 4 during the second repetition; 106 is obtained by counting up to 10 repetitions of the digit sequence from 0 to 9, stopping at the number 6 during the last repetition, and so on.
  • Formal Languages, Automata and Numeration Systems 2
    eBook - ePub

    Formal Languages, Automata and Numeration Systems 2

    Applications to Recognizability and Decidability

    • Michel Rigo(Author)
    • 2014(Publication Date)
    • Wiley-ISTE
      (Publisher)

    2

    A Range of Numeration Systems

    The way we do arithmetic is intimately related to the way we represent the numbers we deal with. Donald E. Knuth [KNU 12]
    It is not possible (or it would deserve a complete volume) to give a comprehensive presentation of the various and exotic numeration systems that have so far been developed. Many clever non-standard systems were devised to solve relevant problems, create better or easier computational procedures, define convenient codings, etc. Numerical algorithms depend on the chosen representations. The mathematical notion of a number (e.g. integers, real numbers, complex numbers, vectors of these, ...) is independent of any chosen representation, but the way we represent or expand numbers has an influence on how operations on these numbers will be performed (e.g. comparison, addition, parallelization or pipelining of a series of computations).
    EXAMPLE 2.1.– Take the usual base-2 expansions. Using the digit set {0, 1}, every positive integer n has infinitely many representations of the form 0j c k ··· c 0 where j ≥ 0, c k ≠ 0 and . Using the digit set {1, 2}, every positive integer has a unique expansion. Finally, with the digit set {−1, 0, 1}, we can represent positive as well as negative integers. In that case, addition of two numbers can be performed in parallel, because we can get rid of carry propagation using Avizienis’s algorithm [AVI 61].
    Each of these three variants of the binary system is what we call a positional numeration system (PNS). There exists a sequence (
    Ui
    )
    i ≥0
    of integers – here the sequence (2i )
    i ≥0
    – such that every word
    ck
    ··· c 0 is a representation of the integer . Roughly speaking, the weight of the digit
    cj
    depends on its position within the word. If the sequence (
    Ui
    )
    i ≥0
    is increasing, the leftmost non-zero digit (respectively, the rightmost digit) is, thus, referred to as the most significant (respectively, least significant
  • Foundations of Computing
    eBook - ePub

    Foundations of Computing

    Essential for Computing Studies, Profession And Entrance Examinations - 5th Edition

    • Pradeep K. Sinha, Priti Sinha(Authors)
    • 2022(Publication Date)
    • BPB Publications
      (Publisher)
    Chapter 2

    Internal Data Representation in Computers

    In this chapter, you will learn how computers internally represent data, and how they perform various basic operations (comparison, sorting, addition, subtraction, multiplication, division, etc.) on these data. The chapter first explains the fundamental concepts of number system and introduces some number systems commonly used by computer professionals and relationship among them. It then presents the commonly used coding schemes to record data in computers. It finally explains how computers perform various basic operations internally.

    NUMBER SYSTEMS USED IN COMPUTERS

    Number systems are of two types - non-positional and positional. In non-positional number system , we have symbols such as I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, etc. Each symbol represents the same value regardless of its position in a number, and to find the value of a number, one has to count the number of symbols present in the number. Since it is difficult to perform arithmetic with such a number system, positional number systems were developed.
    In a positional number system , there are only a few symbols called digits. These symbols represent different values, depending on the position they occupy in a number. The following three considerations determine the value of each digit in such a number:
    1. The digit itself,
    2. The position of the digit in the number, and
    3. The base of the number system. Base is defined as the total number of digits in the number system. The first digit is always zero. Hence, the maximum value of a single digit is always equal to one less than the value of the base.
    As an illustration, let us consider decimal number system
  • Digital Electronics 1
    eBook - ePub

    Digital Electronics 1

    Combinational Logic Circuits

    • Tertulien Ndjountche(Author)
    • 2016(Publication Date)
    • Wiley-ISTE
      (Publisher)
    1 Number Systems

    1.1. Introduction

    Digital systems are used to process data and to perform calculations in most instrumentation, monitoring and communication devices. As physical quantities and signals can only take discrete values in a digital system, the interpretation of real-world information requires the use of interface circuits such as data converters.
    In general, numbers may be represented in different numeration systems. The decimal system is commonly used in routine transactions while the binary system is the basis for digital electronics. Every number (or numeration) system is defined by a base (or radix), which is a collection of distinct symbols. The representation of a number in a numeration system may be considered as a change in base. In a positional number system, a value of a number depends on the place occupied by each of its digits in the representation.

    1.2. Decimal numbers

    The decimal number system uses the following 10 numbers or symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The radix is thus 10. EXAMPLE 1.1.– Decompose the numbers 734 and 12345 into powers of 10. The decomposition of the number 734 takes the form: For the number 12345, we have: Depending on its position, each number is multiplied by the appropriate power of 10. The right-most digit represents the unit digit.

    1.3. Binary numbers

    Binary number system is based on two-level logic, conventionally noted as 0 (low level) and 1 (high level). It is a system with a radix of two.
  • Information Technology
    eBook - ePub

    Information Technology

    An Introduction for Today's Digital World

    4

    The Binary Numbering System

    Computers operate on data that are in any one of the states such as high or no (low) voltage. We refer to these two states using binary numbers of 1 and 0. In this chapter, we explore binary numbers so that we can understand how information can be stored in this way, and we look at the operations that we can directly perform on binary numbers. These operations are known as the Boolean operators. We then look at how to perform arithmetic operations using the Boolean operators. To start, we look at numbering systems in general before focusing specifically on binary. We also briefly consider two other numbering systems, octal and hexadecimal. The learning objectives of this chapter are to be able to:
    •  Convert numbers from one numbering system to another •  Convert positive and negative integers into binary representations and binary numbers into positive and negative integers •  Describe what floating-point numbers are how their storage and processing differ from integer storage and processing •  Apply Boolean operators •  Explain how Boolean operators are used to perform basic binary arithmetic of addition, subtraction, negation, and comparison

    4.1      NUMBERING SYSTEMS

    A positional numbering system (also known as a positional numeral system) is a writing system for expressing numbers. Each numbering system has a base (also called a radix). The base dictates the range of legal digits and how to interpret those digits. For instance, base 10 (decimal) uses digits 0–9, and we interpret the digits of a number in powers of 10. Specifically, a decimal number’s digits are interpreted as 1s, 10s, 100s, and so forth by referencing the 1s column, the 10s column, the 100s column, etc.
    Did You Know?
    The Roman numeral system is not positional. The letters that make up values are not digits. Instead, it is an additive/subtractive system whereby letters representing smaller values immediately before or after larger letters cause us to add or subtract. For instance, XLVII is “10 minus 50 plus 5 plus 2” or 47.
  • Fundamentals of Digital Logic and Microcontrollers
    • M. Rafiquzzaman(Author)
    • 2014(Publication Date)
    • Wiley
      (Publisher)
    Chapter 2 Number Systems and Codes
    This chapter describes the basics of number systems, codes, and error detection/correction. Note that adequate coverage of Number Systems and Codes is included in this chapter. This will provide sufficient background to understand the concepts described in the chapters that follow.

    2.1 Number Systems

    A computer, like all digital systems, utilizes two states to represent information. These two states are given the symbols 0, and 1. It is important to remember that these 0's and 1's are symbols for the two states and have no inherent numerical meanings of their own. These two digits are called binary digits (bits) and can be used to represent numbers of any magnitude. Digital systems including the microcontroller carry out all arithmetic and logic operations internally using binary numbers. Because binary numbers are long, a more compact form using some other number system is preferable to represent them. The computer user finds it convenient to work with this compact form. Hence, it is important to understand the various number systems used with computers. These are described in the following sections.

    2.1.1 General Number Representation

    In general, N can be written as a string of digits whose integer parts(d
    p-1
    ,d
    p-2
    , ......,d1 ,d0 ) and fractional parts (d−1 “ d-q ) are separated by the radix or decimal point (•). In this format, the number N is represented as
    2.1
    If a number has no fractional portion, then the number is called an integer number or an integer. Conversely, if the number has no integer portion, then the number is called a fractional number or a fraction. The number, N can also be represented in the following form:
    2.2
    where b is the base or radix of the number system, the d’s are the digits of the number system, p is the number of integer digits, and q is the number of fractional digits.
    Decimal Number System
    The decimal number system has a base or radix of 10 and has 10 allowable digits, 0 through 9. As an example, consider the number 125.53210
  • Digital Electronics: A Primer
    eBook - ePub

    Digital Electronics: A Primer

    Introductory Logic Circuit Design

    • Mark Nixon(Author)
    • 2015(Publication Date)
    • ICP
      (Publisher)

    Chapter 7

    Number Systems, Coding, and Arithmetic

    7.1   Numbers and Coding Systems

    7.1.1   Common number coding systems

    T he basic form of a number is a collection of digits arranged into integer and fractional parts. The digits are arranged in order of significance and numbers are left justified when the most significant digit is to the left. A number’s arrangement is
    The part of the number to the left of the (decimal) point is an n + 1 digit integer and the part to the right is an m digit fraction. The base of the number is called its radix and this is denoted by r in the number. Each digit is multiplied by the radix raised to the power associated with that digit. The least significant digit in the integer part is actually D0 × r0 and the radix part is omitted, since r0 = 1. In order to avoid confusion, the radix is often used as a subscript to denote the number system used, so 1110 denotes 11 in the decimal system, whereas 112 denotes a binary number (310 ). A decimal number is base 10 and so the radix r is 10. The decimal system uses ten symbols, 0, 1, 2. . .9. The number 1874.2810 is then
    The binary system has only two values. The radix is two and the two symbols are 0 and 1. Each digit in a binary number is known as a binary digit or bit. In natural binary, the number 1101.012 represents the number
    If you want to be mega pedantic, it’s now called a ‘binary’ point, not a decimal point. When I (once) called it a binary point in lectures, some guy at the front muttered ‘get a life’. Good point (sic).
    And in decimal
    Binary coded decimal (BCD) uses decimal digits coded using the binary system. The codes for each digit follow the binary sequence, starting with 010 = 00002 , 110 = 00012 , 210 = 00102 through to nine, which is represented by 10012 = (1 × 8 + 0 × 4 + 0 × 2 + 0 × 1)10 . Note that four bits are needed for each BCD digit since this allows coding of the ten digits. Six of the codes possible for the four bits (10102 through to 11112
  • Lectures on Digital Design Principles
    • Pinaki Mazumder, Idongesit E. Ebong(Authors)
    • 2023(Publication Date)
    • River Publishers
      (Publisher)
    The simplest numeral system is the unary numeral system ; this number system works by repeating characters for larger numbers. For example, the tally marks system still utilized today in many game settings is shown in Figure 2.1 a. Each character is represented by a forward slash, “/,” and the number of slashes indicates the value of the number represented. A more sophisticated unary numeral system, even though not commonly used today, is the Roman numeral system, as shown in Figure 2.1 b. Figure 2.1 (a) Tally mark counting to 7 and (b) Roman numeral counting to 7. Unary systems have been used throughout history, with some of its variants including the Egyptian and Chinese Numeral Systems. The problem with unary Numeral Systems is that they become very cumbersome when they deal with large numbers. For example, try computing the following arithmetic without converting to the decimal system you are used to: (XLII × MC) – (XXI × MMCC). Compare that to the following equivalent calculation: (42 × 1100) – (21 × 2200). The ease of working with the positional numeral system has contributed to its widespread use. 2.1.2 The positional numeral system, or the place-value system The positional numeral system 1 is the common number system used. For example, the number 1385.3 is interpreted as (1 × 1000) + (3 × 100) + (8 × 10) + (5 × 1) + (3 × 0.1). Each digit in the number 1385.3 is multiplied by a different place value and added together in order to obtain the value of the number. The given number 1385.3 is in decimal format because every place value is a power of 10. Hence, 1385.3 is therefore interpreted as 1 The Babylonian sexagesimal (base-60) system, which was supposedly inherited from Sumerian civilization (c. 4500c. 1900 BC) is credited as being the first positional numeral system (PNS). The Babylonian system (c. 2000 BC) used only two distinct symbols similar to I and < to count unit and ten, respectively
  • The Britannica Guide to Numbers and Measurement
    The first ciphered system seems to have been the Egyptian hieratic (literally “priestly”) numerals, so called because the priests were presumably the ones who had the time and learning required to develop this shorthand outgrowth of the earlier hieroglyphic numerals. An Egyptian arithmetical work on papyrus, employing hieratic numerals, was found in Egypt about 1855; known after the name of its purchaser as the Rhind papyrus, it provides the chief source of information about this numeral system. There was a still later Egyptian system, the demotic, which was also a ciphered system.
    As early as the 3rd century BCE, a second system of numerals, paralleling the Attic numerals, came into use in Greece that was better adapted to the theory of numbers, though it was more difficult for the trading classes to comprehend. These Ionic, or alphabetical, numerals, were simply a cipher system in which nine Greek letters were assigned to the numbers 1–9, nine more to the numbers 10, …, 90, and nine more to 100, …, 900. Thousands were often indicated by placing a bar at the left of the corresponding numeral.
    Such numeral forms were not particularly difficult for computing purposes once the operator was able automatically to recall the meaning of each. Only the capital letters were used in this ancient numeral system, the lowercase letters being a relatively modern invention.
    Other ciphered Numeral Systems include Coptic, Hindu Brahmin, Hebrew, Syrian, and early Arabic. The last three, like the Ionic, are alphabetic ciphered Numeral Systems.
    POSITIONAL NUMERAL SYSTEMS
    The decimal number system is an example of a positional system, in which, after the base b has been adopted, the digits 1, 2, …, b − 1 are given special names, and all larger numbers are written as sequences of these digits. It is the only one of the systems that can be used for describing large numbers, since each of the other kinds gives special names to various numbers larger than b , and an infinite number of names would be required for all the numbers. The success of the positional system depends on the fact that, for an arbitrary base b , every number N
  • Electronic Digital System Fundamentals
    • Dale R. Patrick, Stephen W. Fardo, Vigyan (Vigs) Chandra, Brian W. Fardo(Authors)
    • 2023(Publication Date)
    • River Publishers
      (Publisher)
    Digital electronics is considered to be a counting operation. A digital watch tells time by counting generated pulses. The resulting count is then displayed by numbers representing hours, minutes, and seconds. A computer also has an electronic clock that generates pulses. These pulses are counted and in many cases manipulated to perform a control function. Digital circuits can store signal data, retrieve it when needed, and make operational decisions. Signal values are generally represented by two-state data. A pulse is either present or it is not. Data are either of high value or low value, with nothing in between. Digital electronics is dependent on the manipulation of two-state data.

    5.2 Digital Numbering Systems

    Digital information has been used by human beings for almost all of their history. Parts of the human body were first used as a means of counting. Fingers and toes were often used to represent numbers. In fact, the word digitus in Latin means finger or toe. This term is the basis of the word digital.
    Most counting that we do today is based on groups of 10. This is probably an outgrowth of our dependence on fingers and toes as a counting tool. Counting with 10 as a base is called the decimalsystem. Ten unique symbols, or digits, are included in this system: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. In general, the number of discrete values or symbols in a counting system is called the base, or radix. A decimal system has a base of 10.
    Nearly all numbering systems have place value. This refers to the value that a digit has for its location in the number. The largest number value that can be represented at a specific location is determined by the base of the system. In the decimal system, the first position to the left of the decimal point is called the units place. Any number from 0 to 9 can be used in this place. Number values greater than 9 are expressed by using two or more places. The next location to the left of the unit’s place is the 10s position. Two-place numbers range from 10 to 99. Each succeeding place added to the left has a value that is 10 times as much as the preceding place. With three places, the place value of the third digit is 10 × 10 × 10, or 1000. For four places, the place value is 10 × 10 × 10 × 10, or 10,000. The values continue for 100,000, 1,000,000, 10,000,000, and so on.
    Any number in standard form can be expressed in expanded form by adding each weighted place value. The decimal number 2319 is expressed as (1000 × 2) + (100 × 3) + (10 × 1) + (1 × 9). Note that the weight of each digit increased by 10 for each place to the left of the decimal point. In a number system, place values can also be expressed as a power of the base. For the decimal system, the place values are 10°, 101, 102, 103, and so on. Each succeeding place has a value that is the next higher power of the base.
  • Numbers
    eBook - ePub

    Numbers

    Arithmetic and Computation

    • Asok Kumar Mallik, Amit Kumar Das(Authors)
    • 2022(Publication Date)
    • CRC Press
      (Publisher)
    Chapter 6 Computer and programming fundamentals
    We 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.
    Well, it seems to be a tall-order; believe us it would be very short and fun to learn.

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

    Numbers

    Histories, Mysteries, Theories

    • Albrecht Beutelspacher, Andrea Bruder, Andrea Easterday(Authors)
    • 2016(Publication Date)
    binary system . In principle, things work just like they do in the decimal system: The value of a digit depends on its place. In the decimal system, a 1 as the last digit just means one, in the second to last place it has a value of ten, in the third to last place one hundred, and so on.
    In the binary system, a 1 in the second to last place has a value of two; the number two is thus written as 10. The binary number 11 means three; since the 1 in the last place has a value of one, and the 1 in the second to last place has a value of two, and these add up to three.
    Does that make sense? Let’s take a step beyond this. A 1 in the third to last place has a value of four (since 2 times 2 is 4). This means that the number four is written as 100, the number five 101, the number six 110, and finally the number seven as 111. Clearly, since 111 means: 1 one, 1 two, and 1 four, together this adds up to seven. The first few numbers are therefore written in binary as follows: 1, 10, 11, 100, 101, 110, 111, 1000, . . . .
    Decimal number Binary number
    0 0
    1 1
    2 10
    3 11
    4 100
    5 101
    6 110
    7 111
    8 1000
    9 1001
    10 1010
    11 1011
    12 1100
    13 1101
    14 1110
    15 1111
    The binary numbers from 0 to 15
    This is the representation of numbers used by modern computers. All data, regardless of whether they are text, audio, or video data, are represented by numbers, and numbers are represented by zeros and ones, i.e., bits. What we take for granted today is the original vision of the American mathematician Claude E. Shannon (1916–2001), who published an article in 1948, in which he described his insights: Any kind of information may be represented in the form of “bits” (“binary digits”). Without Shannon’s idea, the development of information technology would most likely have taken a different path.
    Before Shannon, Leibniz had envisioned a binary computer. However, he did not pursue his idea of a “Machina Arithmeticae Dyadicae,” because his computing machine based on the decimal system had already confronted him with almost unsolvable problems.
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.