number system

22 views
Skip to first unread message

Aswwang Kakakokda

unread,
Jul 7, 2012, 6:02:32 AM7/7/12
to ccm111_20...@googlegroups.com
Timothy Stephen F Hazen

HN3


1.Binary number system

Definition - What does Binary Number System mean?

The binary number system is a numbering system that represents numeric values using two unique digits (0 and 1). Mosting computing devices use binary numbering to represent electronic circuit voltage state, (i.e., on/off switch), which considers 0 voltage input as off and 1 input as on.

This is also known as the base-2 number system, or the binary numbering system.

Techopedia explains Binary Number System

Microcontrollers only use binary logic in computing. Compare this to the decimal numbering system, which is comprised of 10 unique digits (0-9). For example, a user input of 345 (in decimals) is 101011001 in binary form.

2.Decimal number System


Probably the biggest stumbling block most beginning programmers encounter when attempting to learn assembly language is the common use of the binary and hexadecimal numbering systems. Understanding these numbering systems is important because their use simplifies other complex topics including boolean algebra and logic design, signed numeric representation, character codes, and packed data.
This section discusses several important concepts including the binary, decimal, and hexadecimal numbering systems, binary data organization (into bits, nibbles, bytes, words, and double words), signed and unsigned number systems, arithmetic, logical, shift, and rotate operations on binary values, bit fields and packed BCD (Binary Coded Decimal) data, and the ASCII (American Standard Code for Information Interchange) character set. This is basic material and the remainder of this tutorial depends upon your understanding of these concepts. If you are already familiar with these terms from other courses or study, you should at least skim this material before proceeding to the next chapter. If you are unfamiliar with this material, or only vaguely familiar with it, you should study it carefully before proceeding. All of the material in this chapter is important! Do not skip over any material.
Most modern computer systems do not represent numeric values using the decimal system. Instead, they typically use a binary or two's complement numbering system. To understand the limitations of computer arithmetic, you must understand how computers represent numbers.

3.Octal number system

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right). For example, the binary representation for decimal 74 is 1001010, which can be grouped into (00)1 001 010 – so the octal representation is 112.
In decimal systems each decimal place is a base of 10. For example:
\mathbf{74}_{10} = \mathbf{7} \times 10^1 + \mathbf{4} \times  10^0
In octal numerals each place is a power with base 8. For example:
\mathbf{112}_8 = \mathbf{1} \times  8^2 + \mathbf{1} \times  8^1 + \mathbf{2} \times  8^0
By performing the calculation above in the familiar decimal system we see why 112 in octal is equal to 64+8+2 = 74 in decimal.


4.Hexadecimal number system

In mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B, C, D, E, F (or alternatively af) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160), or 10995.
Each hexadecimal digit represents four binary digits (bits), and the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics. One hexadecimal digit represents a nibble, which is half of an octet (8 bits). For example, byte values can range from 0 to 255 (decimal), but may be more conveniently represented as two hexadecimal digits in the range 00 to FF. Hexadecimal is also commonly used to represent computer









juvymalab

unread,
Jul 7, 2012, 6:50:38 AM7/7/12
to ccm111_20...@googlegroups.com, Aswwang Kakakokda
NAME:JUVY MALABAR
SECTION:HA3

1.BINARY NUMBER SYSTEM
The main difference between the binary number system and our familiar base 10 numeration system is that grouping is done in groups of 2 instead of 10.

For instance, to represent 24 in base 10 using sticks, you could use two groups of ten and 4 as shown below

28-in-base-10-image


There is something important though to keep in mind and this is the key to understanding this lesson!

  • The digits 0,1,2,3,4,5,6,7,8,9 are used to represent all possible numbers. Notice that base 10 has 10 digits

  • Depend on how big the number is, we make groups of ten, hundred, thousand, ten-thousand, etc...(These are power of 10: 101 = 10, 102 = 100, 103 = 1000)

  • If a number is less than 10 for example 8 and 9, there is no need to create groups. And this number will occupy the ones place value

  • If a number is bigger than 9 and less than 100 for example 10, 55 and 98, there is a need to create groups of ten. Groups of ten will occupy the tens place value.

  • If a number is bigger than 99 and less than 1000 for example 100, 255 and 999, there is a need to create groups of hundred. Groups of hundred will occupy the hundreds place value.

2.DECIMAL NUMBER SYSTEM

Probably the biggest stumbling block most beginning programmers encounter when attempting to learn assembly language is the common use of the binary and hexadecimal numbering systems. Understanding these numbering systems is important because their use simplifies other complex topics including boolean algebra and logic design, signed numeric representation, character codes, and packed data.

This section discusses several important concepts including the binary, decimal, and hexadecimal numbering systems, binary data organization (into bits, nibbles, bytes, words, and double words), signed and unsigned number systems, arithmetic, logical, shift, and rotate operations on binary values, bit fields and packed BCD (Binary Coded Decimal) data, and the ASCII (American Standard Code for Information Interchange) character set. This is basic material and the remainder of this tutorial depends upon your understanding of these concepts. If you are already familiar with these terms from other courses or study, you should at least skim this material before proceeding to the next chapter. If you are unfamiliar with this material, or only vaguely familiar with it, you should study it carefully before proceeding. All of the material in this chapter is important! Do not skip over any material.

Most modern computer systems do not represent numeric values using the decimal system. Instead, they typically use a binary or two's complement numbering system. To understand the limitations of computer arithmetic, you must understand how computers represent numbers.

3.OCTAL NUMBER SYSTEM

The octal, or base 8, number system is a common system used with computers. Because of its relationship with the binary system, it is useful in programming some types of computers.

Look closely at the comparison of binary and octal number systems in table 1-3. You can see that one octal digit is the equivalent value of three binary digits. The following examples of the conversion of octal 2258 to binary and back again further illustrate this comparison:

4.HEXADECIMAL NUMBER SYSTEM
A big problem with the binary system is verbosity. To represent the value 202 requires eight binary digits.

The decimal version requires only three decimal digits and, thus, represents numbers much more compactly than does the binary numbering system. This fact was not lost on the engineers who designed binary computer systems.

When dealing with large values, binary numbers quickly become too unwieldy. The hexadecimal (base 16) numbering system solves these problems. Hexadecimal numbers offer the two features:

  • hex numbers are very compact
  • it is easy to convert from hex to binary and binary to hex.

The Hexadecimal system is based on the binary system using a Nibble or 4-bit boundary. In Assembly Language programming, most assemblers require the first digit of a hexadecimal number to be 0, and place an "h" at the end of the number to denote the number base.  In PICBASIC, we simply put a "$" at the left end of the number.


Reply all
Reply to author
Forward
0 new messages