What Is Binary Language?

While every modern computer exchanges and processes information in the ones and zeros of binary, rather than the more cumbersome ten-digit decimal system, the idea isn't a new one.


Australia's aboriginal peoples counted by two, and many tribes of the African bush sent complex messages using drum signals at high and low pitches. Morse code, as well, uses two digits (dots and dashes) to represent the alphabet.


Gottfried Leibniz laid the modern foundation of the movement from decimal to binary as far back as 1666, while John Atanasoff, a physics professor at Iowa State College, had built a prototype binary computer by 1939.


In the meantime, Claude Shannon, Konrad Zuse and George Stibitz had been pondering away in their own corners of the world, musing on the benefits of combining binary numbers with boolean logic.
. . . . . . . . . . . . . . . . . . . .
Today, of course, and in almost every computer built since the 1950s, the binary system has replaced the decimal (which really only came about because it was handy to be able to count on your fingers) and advanced digital computer capabilities to an incredible degree.


Basically, binary simplifies information processing. Because there must always be at least two symbols for a processing system to be able to distinguish significance or purpose, binary is the smallest numbering system that can be used.


The computer's CPU need only recognise two states, on or off, but (with just a touch of Leibniz' mysticism) from this on-off, yes-no state all things flow - in the same way as a switch must always be open or closed, or an electrical flow on or off, a binary digit must always be one or zero.


If switches are then arranged along boolean guidelines, these two simple digits can create circuits capable of performing both logical and mathematical operations.


The reduction of decimal to binary does increase the length of the number, a lot, but this is more than made up for in the increase in speed, memory and utilisation.
Especially utilisation. Remember, computers aren't always dealing with pure numbers or logic. Pictures and sound must first be reduced to numerical equivalents that, in turn, have to be decoded again for the end result.
. . . . . . . . . . . . . . . . . . . .
 
 
 
So, how does it work?


It's not so very difficult, really. Binary numbers use the same rules as decimal - the value of any digit always depends on its position in the whole number.
It all gets down to bases. Decimal uses base ten, so that every time a number moves one position to the left in a figure, it increases by a power of ten (eg. 1, 10, 100 etc). Binary, on the other hand, uses base two, so each move to the left increases the value by a power of two (eg. 1, 2, 4 etc).
To convert from decimal to binary, or the other way around, you need only look at the figure's place in the whole number and add up it's value.
Simple.
. . . . . . . . . . . . . . . . . . . .

Binary vs decimal


Decimal
101

0

1

2

3

4

5

6

7

8

9
10


Binary
8421



0



1


10


11

100

101

110

111
1000
1001
1010




 
 
Because binary uses base two as opposed to the decimal base ten, the numbers get larger much more quickly, but they still obey the same principles.

In this case, the number ten is represented by 10 (no 1s, one x 10) in decimal, and 1010 (no 1s, one x 2, no 4s, one x 8) in binary.
 
 
 
. . . . . . . . . . . . . . . . . . .


Conversion


To convert a decimal number to binary, you need only keep subtracting the largest power of two. Here the decimal 200 is represented by 11001000 (one x 128, one x 64, no 32s, no 16s, one x 8, no 4s, no 2s, no 1s)
From binary to decimal is even easier - just add up the columns.


Decimal
100101
200
2 x 100 + 0 + 0 = 200


Binary
1286432168421
11001000
1 x 128 + 1 x 64 + 0 + 0 + 1 x 8 + 0 + 0 + 0 =200
. . . . . . . . . . . . . . . . . . . .
Addition
Again, addition differs only from decimal in that it is using base two.











+
Decimal
100101
200

50
250










+
Binary
1286432168421
11001000
00110010
11111010
The only trick here is to remember that it is base 2 - whereas in decimal 1 + 1 = 2 with nothing to carry into the next column, in binary, 1 + 1 still = 2, but that 2 is carried forward (as a 1, naturally).











+
Decimal
101

1

1

2










+
Binary
21

1

1
1

What Is C Programming Language?




The C Programming Language

 

History

C was developed at Bell Laboratories in 1972 by Dennis Ritchie. Many of its principles and ideas were taken from the earlier language B and B's earlier ancestors BCPL and CPL. CPL ( Combined Programming Language ) was developed with the purpose of creating a language that was capable of both high level, machine independent programming and would still allow the programmer to control the behavior of individual bits of information.



The one major drawback of CPL was that it was too large for use in many applications. In 1967, BCPL ( Basic CPL ) was created as a scaled down version of CPL while still retaining its basic features. In 1970, Ken Thompson, while working at Bell Labs, took this process further by developing the B language.



B was a scaled down version of BCPL written specifically for use in systems programming. Finally in 1972, a co-worker of Ken Thompson, Dennis Ritchie, returned some of the generality found in BCPL to the B language in the process of developing the language we now know as C.



C's power and flexibility soon became apparent. Because of this, the Unix operating system which was originally written in assembly language, was almost immediately re-written in C ( only the assembly language code needed to "bootstrap" the C code was kept ). During the rest of the 1970's, C spread throughout many colleges and universities because of it's close ties to Unix and the availability of C compilers.



Soon, many different organizations began using their own versions of C causing compatibility problems. In response to this in 1983, the American National Standards Institute ( ANSI ) formed a committee to establish a standard definition of C which became known as ANSI Standard C




Today C is in widespread use with a rich standard library of functions.



 

Significant Language Features

C is a powerful, flexible language that provides fast program execution and imposes few constraints on the programmer. It allows low level access to information and commands while still retaining the portability and syntax of a high level language. These qualities make it a useful language for both systems programming and general purpose programs.



C's power and fast program execution come from it's ability to access low level commands, similar to assembly language, but with high level syntax. It's flexibility comes from the many ways the programmer has to accomplish the same tasks. C includes bitwise operators along with powerful pointer manipulation capabilities. C imposes few constraints on the programmer.



The main area this shows up is in C's lack of type checking. This can be a powerful advantage to an experienced programmer but a dangerous disadvantage to a novice.



Another strong point of C is it's use of modularity. Sections of code can be stored in libraries for re-use in future programs. This concept of modularity also helps with C's portability and execution speed. The core C language leaves out many features included in the core of other languages.



These functions are instead stored in the C Standard Library where they can be called on when needed.. An example of this concept would be C's lack of built in I/O capabilities. I/O functions tend to slow down program execution and also be machine independent when running optimally. For these reasons, they are stored in a library separately from the C language and only included when necessary. 




Areas of Application

The C programming language is used in many different areas of application, but the most prolific area is UNIX operating system applications. The C language is also used in computer games: