Professional Web Design Services. "we believe in a future of possibilities and abundance. A future filled with excellence made possible by a new generation of visionaries and leaders. Choose from our range of innovative and work ready programmes"

Binary

What is a binary

The binary system is a method for working with numbers based on only two digits: 1 and 0 (binary is also known as “base two”). Binary numbers are the basis for computer storage. Input into the computer is changed into binary numbers that the computer can store and manipulate. A binary numbering system uses a series of 1’s and 0’s to represent any number. Non-numbers (such as the letter D) or characters (such as a question mark) are assigned an eight digit binary number so that they too can be represented within the computer.

Binary numbers can also represent decisions and results. For example, a yes (or true) will be represented by a 1, and a no (or false) can be represented by a 0. Each one of these single signals, 1 or 0, is called a bit.Using this method, the computer can compare two numbers and, if they are equal, make the result equal to 1. If they are not equal, the result would be 0. In addition, the computer can take further action based on this comparison. For example, if the result was true (1), a certain series of commands could be performed. If the result were false (0), a different set of commands could be performed.

The 1’s and 0’s of a computer’s binary system are represented by two electronic states: ON (high voltage electrical current) or OFF (low current). Quite simply, the 1’s and O’s are like little ON/OFF switches inside the computer. Basing an electronic system on the binary system that uses just two numbers is much easier and less expensive than using the decimal system (which has to differentiate between 10 different states: 0, 1,2,3,4,5,6,7,8, and 9).

Binary data is stored as bits, each bit equal to a 0 or a 1. Eight bits equal one byte of information (a single character, such as the letter S or the number 4). For example, the binary number for the letter A is 01000001.

For those who like number puzzles, this is from Steve; To make the conversion between binary and decimal, start at the right and multiply each digit by the next higher power of two, then add up all your answers. So, with 10101, the first digit equals 1 (1 times 1: 2 to the 0th power is 1); the next digit is 0 (21 equals 2, but 2 times 0 makes 0); the third digit equals 4 (1 x 22); the fourth digit is 0 again; and the 1 on the left equals 16 (1x 24). And 16 + 0 + 4 + 0 + 1 = 21. What fun!

What are BCD numbers

The binary coded decimal (BCD) is a type of binary code used to represent a given decimal number in an equivalent binary form. Its main advantage is that it allows easy conversion to decimal digits for printing or display and faster calculations.

The most common BCD code is the 8421 BCD code. In this, the BCD equivalent of a decimal number is written by replacing each decimal digit in integer and fractional parts with its four-bit binary equivalent ‘(or nibble). Here 8, 4, 2 and 1 represent the weights of different bits in the four-bit groups, starting from the (MSB) most significant bit (to extreme left) and proceeding towards the least significant (LSB) bit.

This feature makes it a weighted code, whose main characteristic is that each binary digit in the four bit group representing a given decimal digit is assigned a weight, and for each group of four bits, the sum of the weights of those binary digits whose value is 1 is equal to the decimal digit which they represent.

For example, if we look at table, we find that the decimal digit 9 when represented in 8421 BCD is 1001. Now the decimal digit assigned to first 1 is 8 and to the second 1 is 1. If we add 8 and 1 we get the required decimal number which is 9.

BCD Code Chart

The 4221 BCD and 5421 BCD are other weighted BCD codes shown in table. The numbers 4, 2, 2, 1 in 4221 BCD and 5, 4, 2 and 1 in 5421 BCD represent weights of the relevant bits.

Now let us consider some examples, where we convert the given decimal numbers to BCD.

The 8421 BCD code for 9.2 is 1001.0010.

BCD for 9.2

The 4221 BCD code for 9.2 is 1111.0010.

The 5421 BCD code for 9.2 is 1100.0010.

BCD code is useful for outputting to displays that are always numeric (0 to 9), such as those found in digital clocks or digital voltmeters.

What is ASCII Code?

ASCII Stands for American Standard Code for Information Interchange (pronounced ‘as-key’).  This is a standard set of characters understood by all computers, consisting mostly of letters and numbers plus a few basic symbols such as $ and %. Which employs the 128 possible 7-bit integers to encode the 52 uppercase and lowercase letters and 10 numeric digits of the Roman alphabet, plus punctuation characters and some other symbols. The fact that almost everyone agrees on ASCII makes it relatively easy to exchange information between different programs, different operating systems, and even different computers.

It also means you can easily print basic text and numbers on any printer, with the notable exception of PostScript printers. If you are working in the MacWrite word processing application on the Mac and you need to send your file to someone who uses WordStar on the PC, you can save the document as an ASCII file (which is the same as text-only). After you transfer the file to the PC (on a disk or via a cable or modem),the other person will be able to open the file in WordStar.

In ASCII, each character has a number which the computer or printer uses to represent that character. For instance, a capital A is number 65 in the code. Although there are 256 possible characters in the code, ASCII standardizes only 128 characters, and the first 32 of these are “control characters,” which are supposed to be used to control the computer and don’t appear on the screen. That leaves only enough code numbers for all the capital and lowercase letters, the digits, and the most common punctuation marks.

Another ASCII limitation is that the code doesn’t include any information about the way the text should look (its format). ASCIIonly tells you which characters the text contains. If you save a formatted document asASCII,you will lose all the font formatting, such as the typeface changes, the italics, the bolds, and even the special characters like ©, TM, or ®. Usually carriage returns and tabs are saved.

Unlike some earlier character encodings that used fewer than 7 bits, ASCII does have room for both the uppercase and lowercase letters and all normal punctuation characters but, as it was designed to encode American English it does not include the accented characters and ligatures required by many European languages (nor the UK pound sign £). These characters are provided in some 8-bit EXTENDED ASCII character sets, including ISO LATIN 1 or ANSI 1, but not all software can display 8-bit characters, and some serial communications channels still remove the eighth bit from each character. Despite its shortcomings, ASCII is still important as the ‘lowest common denominator’ for representing textual data, which almost any computer in the world can display.

The ASCII standard was certified by ANSI in 1977,and the ISO adopted an almost identical code as ISO 646.

Design a site like this with WordPress.com
Get started