Role of Binary

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Jun 2009
Posts: 3
Reputation: Suraj Nayak is an unknown quantity at this point 
Solved Threads: 0
Suraj Nayak Suraj Nayak is offline Offline
Newbie Poster

Role of Binary

 
0
  #1
Jun 16th, 2009
Hello, Can anyone please explain role of binary in computer?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,850
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 754
Team Colleague
Narue's Avatar
Narue Narue is online now Online
Senior Bitch

Re: Role of Binary

 
2
  #2
Jun 16th, 2009
Did you do any research before posting here? What did you find and why wasn't it sufficient?
New members chased away this month: 4
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 62
Reputation: gurukid22 is an unknown quantity at this point 
Solved Threads: 4
gurukid22 gurukid22 is offline Offline
Junior Poster in Training

Re: Role of Binary

 
0
  #3
Jun 16th, 2009
I'm going to try to say this simply and not go to deply into it.

Computer can only count 1 or 0. Because a computer can send an electrical message being 1.

A binary fragment is eight of ones or zeros like this 0001101 this represents a larger number 0 - 256.

each position represents a number if the number is the number is counted and added to the final sum

Here is a table
1 2 4 8 16 32 64

1 0 0 0 0 0 0 0 = 1
1 1 0 0 0 0 0 0 = 3
1 1 0 0 0 0 0 1 = 67

The answer to your question this is done to allow computer to count higher tan one making computer more efficient. 8 characters could mean one of 256 different things.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 165
Reputation: Fest3er is an unknown quantity at this point 
Solved Threads: 18
Fest3er Fest3er is offline Offline
Junior Poster

Re: Role of Binary

 
0
  #4
Jun 17th, 2009
Originally Posted by Suraj Nayak View Post
Hello, Can anyone please explain role of binary in computer?
In short:

Analog computers do (or did) exist. And they work well for what they do. But they aren't as flexible as digital computers.

Binary is popular because electronics most easily deal with ON and OFF, or HIGH and LOW, or POSITIVE and NEGATIVE. All digital computer operations can be traced to binary AND, OR, NAND and NOR logic.

RF-based digital communication (cable, cellular, et al) is rarely binary. Typically, a symbol (a unit of transmission, at one time called a baud) represents more than one bit, and may represent up to six bits of data.

There are many books available (though probably not in your native language) that can teach you the details and show you just why these things are. Google/Yahoo should help you dig up some solid reference materials that are almost as good as books.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 110
Reputation: s_sridhar has a little shameless behaviour in the past 
Solved Threads: 11
s_sridhar's Avatar
s_sridhar s_sridhar is offline Offline
Junior Poster

Re: Role of Binary

 
0
  #5
Jun 17th, 2009
Yeah, obviously they can recognise only two states on or off. But it may undergo radical changes in future. Read about quantum computers.
Intel inside, mental outside
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 5
Reputation: darkphotn is an unknown quantity at this point 
Solved Threads: 0
darkphotn darkphotn is offline Offline
Newbie Poster

Re: Role of Binary

 
0
  #6
Jun 17th, 2009
Modern computers are based on transistors, which are like light switches -- they are either on or off.

Binary means, roughly, "two", so we use that term to describe this on-off system.

All data processing ("thinking") in the computer is done with on-off switches. Each individual switch is called a "bit." Most computers group the switches into groups of eight, which we call "bytes." A byte can store any number between 0 and 255. A byte can't store any other number.

To store other things, such as letters or colors, you find a way to encode your data as raw numbers between 0 and 255. ASCII is a way of encoding English text as numbers between 0 and 255. RGB is a method of encoding a color as three colors: red, green and blue. Each individual color is stored as a number between o and 255.

Groups of bytes can be combined together to store numbers larger than 255.

8 bits (one byte) stores 256 possible values.
16 bits stores about 66,000 possible values.
32 bits stores about 4 billion possible values.
64 bits stores about 16,000,000,000,000,000,000 possible values.

There are about 60,000 words in the English language, so it might be possible to encode English words using only 16 bits, but 32 bits would be safer.

There are about 6 billion people on earth, so this number wouldn't fit in 32 bits; you'd have to use 64 bits.

In code, we write down binary numbers using ones and zeroes, like this:

00000100

It's customary to write a space between groups of eight (or groups of four) bits, like this:

00000100 10010010 01100110 11010100

A group of four bits is called a "nybble," which is a joke, because a nibble is a little bite.

Three important operations with binary numbers are "or", "and" and "xor" (pronounced "zor" or "x-or").

In the C language, you write "or" as |,
"and" is &
"xor" is ^

"Or" works like this:

0 | 0 = 0
0 | 1 = 1
1 | 0 = 1
1 | 1 = 1

In other words, if either (or both) is 1, the answer is 1.

"And" works like this:

0 & 0 = 0
1 & 0 = 0
0 & 1 = 0
1 & 1 = 1

In other words, if both are 1, the answer is 1.

"Xor" works like this:

0 ^ 0 = 0
1 ^ 0 = 1
0 ^ 1 = 1
1 ^ 1 = 0

In other words, if one or the other is 1, the answer is 1.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 3
Reputation: Suraj Nayak is an unknown quantity at this point 
Solved Threads: 0
Suraj Nayak Suraj Nayak is offline Offline
Newbie Poster

Re: Role of Binary

 
0
  #7
Jun 18th, 2009
Hi Guys,
Still I am confused, how to calculate binary. For example this is the (455555) number, how I calculate this number. Please help....

Thank you.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 110
Reputation: s_sridhar has a little shameless behaviour in the past 
Solved Threads: 11
s_sridhar's Avatar
s_sridhar s_sridhar is offline Offline
Junior Poster

Re: Role of Binary

 
0
  #8
Jun 18th, 2009
Divide the numbers continuously by 2 until you get 0 as the quotient. The net remainder you get is a binary number.
Intel inside, mental outside
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 794
Reputation: siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of 
Solved Threads: 135
siddhant3s's Avatar
siddhant3s siddhant3s is offline Offline
Master Poster

Re: Role of Binary

 
0
  #9
Jun 18th, 2009
Just to clarify what sridhar said, read this http://www.wikihow.com/Convert-from-Decimal-to-Binary
And please learn to use a search engine.
Siddhant Sanyam
(Not posting much)
My Blog: Yatantrika
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 5
Reputation: darkphotn is an unknown quantity at this point 
Solved Threads: 0
darkphotn darkphotn is offline Offline
Newbie Poster

Re: Role of Binary

 
0
  #10
Jun 18th, 2009
In decimal, "45" = 4x10 + 5.

In binary, "101101" = 32 + 8 + 4 + 1.

Memorize this sequence:
1, 2, 4, 8, 16, 32, 64, 128, 256.

Then go to Google or Bing. You need to learn how to search for basic coding questions, because there's already a lot of tutorials out there that explain this.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 583 | Replies: 9
Thread Tools Search this Thread



Tag cloud for Computer Science
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC