Lab exercise2

7 views
Skip to first unread message

Gladys Maglasang

unread,
Jul 7, 2012, 6:45:05 AM7/7/12
to ccm111_20...@googlegroups.com
Name:
Sectoin:

1. Binary Number System 
binary system, numeration system based on powers of 2, in contrast to the familiar decimal system, which is based on powers of 10. In the binary system, only the digits 0 and 1 are used. Thus, the first ten numbers in binary notation, corresponding to the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 in decimal notation, are 0, 1, 10, 11, 100, 101, 110, 111, 1000, and 1001. Since each position indicates a specific power of 2, just as the number 342 means (3 × 102) + (4 × 101) + (2 × 100), the decimal equivalent of a binary number can be calculated by adding together each digit multiplied by its power of 2; for example, the binary number 1011010 corresponds to (1 × 26) + (0 × 25) + (1 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20) = 64 + 0 + 16 + 8 + 0 + 2 + 0 = 90 in the decimal system. Binary numbers are sometimes written with a subscript "b" to distinguish them from decimal numbers having the same digits. As with the decimal system, fractions can be represented by digits to the right of the binary point (analogous to the decimal point). A binary number is generally much longer than the decimal equivalent; e.g., the number above, 1011010b, contains seven digits while its decimal counterpart, 90, contains only two. This is a disadvantage for most ordinary applications but is offset by the greater simplicity of the binary system in computer applications. Since only two digits are used, any binary digit, or bit, can be transmitted and recorded electronically simply by the presence or absence of an electrical pulse or current. The great speed of such devices more than compensates for the fact that a given number may contain a large number of digits.

2. Decimal Number System
Most commonly used number system, to the base ten. Decimal numbers do not necessarily contain a decimal point; 563, 5.63, and -563 are all decimal numbers. Other systems are mainly used in computing and include the binary number system, octal number system, and hexadecimal number system.

The decimals 0.3, 0.51, and 0.023 can be expressed as the decimal fractions 3/10, 51/100, and 23/1,000. They are all terminating decimals. These fractions can equally be expressed as the percentages 30%, 51%, and 2.3%.

Decimal numbers may be thought of as written under column headings based on the number 10. For example:




Using the table, 567 stands for 5 hundreds, 6 tens, and 7 units; 28.02 stands for 2 tens, 8 units, and 2 hundredths.

567 has no numbers after the decimal point, that is 0 decimal places. 28.02 has 2 numbers after the decimal point, that is 2 decimal places.

Large decimal numbers may also be expressed in floating-point notation.

Addition and subtraction
When adding or subtracting decimals it is important to keep the decimal points underneath each other. For example, to work out 13.56 + 4.08 + 9: 

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
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 memory addresses.


Janet Batitang

unread,
Jul 7, 2012, 6:52:11 AM7/7/12
to ccm111_20...@googlegroups.com
1. Binary Number System
A set of eight trigrams and a set of 64 hexagrams, analogous to the three-bit and six-bit binary numerals, were known in ancient China through the classic text I Ching. In the 11th century, scholar and philosopher Shao Yong developed a method for arranging the hexagrams which corresponds to the sequence 0 to 63, as represented in binary, with yin as 0, yang as 1 and the least significant bit on top. There is, however, no evidence that Shao understood binary computation. The ordering is also the lexicographical order on sextuples of elements chosen from a two-element set.[7]
Similar sets of binary combinations have also been used in traditional African divination systems such as Ifá as well as in medieval Western geomancy. The base-2 system utilized in geomancy had long been widely applied in sub-Saharan Africa.
Gottfried Leibniz
In 1605 Francis Bacon discussed a system whereby letters of the alphabet could be reduced to sequences of binary digits, which could then be encoded as scarcely visible variations in the font in any random text.[8] Importantly for the general theory of binary encoding, he added that this method could be used with any objects at all: "provided those objects be capable of a twofold difference only; as by Bells, by Trumpets, by Lights and Torches, by the report of Muskets, and any instruments of like nature".[8] (See Bacon's cipher.)
The modern binary number system was studied by Gottfried Leibniz in 1679. See his article:Explication de l'Arithmétique Binaire[9](1703). Leibniz's system uses 0 and 1, like the modern binary numeral system. As a Sinophile, Leibniz was aware of the I Ching and noted with fascination how its hexagrams correspond to the binary numbers from 0 to 111111, and concluded that this mapping was evidence of major Chinese accomplishments in the sort of philosophical mathematics he admired.[10]
In 1854, British mathematician George Boole published a landmark paper detailing an algebraic system of logic that would become known as Boolean algebra. His logical calculus was to become instrumental in the design of digital electronic circuitry.[11]
In 1937, Claude Shannon produced his master's thesis at MIT that implemented Boolean algebra and binary arithmetic using electronic relays and switches for the first time in history. Entitled A Symbolic Analysis of Relay and Switching Circuits, Shannon's thesis essentially founded practical digital circuit design.[12]
In November 1937, George Stibitz, then working at Bell Labs, completed a relay-based computer he dubbed the "Model K" (for "Kitchen", where he had assembled it), which calculated using binary addition.[13] Bell Labs thus authorized a full research programme in late 1938 with Stibitz at the helm. Their Complex Number Computer, completed January 8, 1940, was able to calculate complex numbers. In a demonstration to the American Mathematical Society conference at Dartmouth College on September 11, 1940, Stibitz was able to send the Complex Number Calculator remote commands over telephone lines by a teletype. It was the first computing machine ever used remotely over a phone line. Some participants of the conference who witnessed the demonstration were John Von Neumann, John Mauchly and Norbert Wiener, who wrote about it in his memoirs.[14][15][16]

The Decimal Number System uses base 10. It includes the digits from 0 through 9. The weighted values for each position is as follows:

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.
Since we'll often need to enter hexadecimal numbers into the computer system, we'll need a different mechanism for representing hexadecimal numbers since you cannot enter a subscript to denote the radix of the associated value.
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 we place an H at the end of the number to denote the number base.
The Hexadecimal Number System:
uses base 16
includes only the digits 0 through 9 and the letters A, B, C, D, E, and F
In the Hexadecimal number system, the hex values greater than 9 carry the following decimal value:


Reply all
Reply to author
Forward
0 new messages