Welcome to the most active Linux Forum on the web.
 Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org [SOLVED] How 2^0 can be considered as 1 in IP Address
 Linux - Newbie This Linux forum is for members that are new to Linux. Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

 10-01-2015, 08:31 PM #1 arun natarajan Member   Registered: Jun 2014 Posts: 108 Rep: How 2^0 can be considered as 1 in IP Address Hi, In IP addressing, when we consider 2^1 is 2, then how 2^0 can be considered as 1 ??? My expectation is, 2^0 should be 0 Representation of single octet: 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 256 128 64 32 16 8 4 2 1 Last edited by arun natarajan; 10-01-2015 at 08:34 PM.
 10-01-2015, 08:35 PM #2 smallpond Senior Member   Registered: Feb 2011 Location: Massachusetts, USA Distribution: CentOS 6 (pre-systemd) Posts: 2,686 Rep: What do you imagine 2^0 equals?
 10-01-2015, 08:50 PM #3 arun natarajan Member   Registered: Jun 2014 Posts: 108 Original Poster Rep: for me, 2^0 is 0 ...i.e 2*0=0
 10-01-2015, 09:03 PM #4 michaelk Moderator   Registered: Aug 2002 Posts: 15,372 Rep: 2^0 is not the same thing as 2*0 http://www.exploringbinary.com/the-laws-of-exponents/ I forgot to mention that an octet is 8 bits which is 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 i.e has a value of 0 - 255 not 256. Last edited by michaelk; 10-02-2015 at 12:09 PM.
 10-02-2015, 10:21 AM #5 suicidaleggroll LQ Guru Contributing Member   Registered: Nov 2010 Location: Colorado Distribution: OpenSUSE, CentOS Posts: 5,393 Rep: 2^0 is and always has been 1 in mathematics...
 10-02-2015, 10:23 AM #6 szboardstretcher Senior Member   Registered: Aug 2006 Location: Detroit, MI Distribution: GNU/Linux systemd Posts: 4,183 Rep: Read: Two(2) to the power of(^) zero(0) is equal(=) to one(1) Explanation of why: http://mathforum.org/dr.math/faq/faq...to.0power.html
 10-02-2015, 12:06 PM #7 arun natarajan Member   Registered: Jun 2014 Posts: 108 Original Poster Rep: Thank you all. Got the answer now.
 10-02-2015, 12:53 PM #8 grail LQ Guru   Registered: Sep 2009 Location: Perth Distribution: Manjaro Posts: 9,437 Rep: Just to be clear ... any number to the power of 0 is 1
10-02-2015, 01:00 PM   #9
szboardstretcher
Senior Member

Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,183

Rep:
Quote:
 Just to be clear ... any number to the power of 0 is 1
Because:

Code:
```    5^2
1 = --- = 5^(2-2) = 5^0 = 1
5^2```

 10-02-2015, 05:52 PM #10 273 LQ Addict Contributing Member   Registered: Dec 2011 Location: UK Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs Posts: 6,387 Rep: To simplify, or complicate, I see the positions within a binary string either on or off so, yes, when position 0 is on that represents 1 but when it is off it represent 0. So it is consistent with the rest.
 10-03-2015, 01:23 AM #11 arun natarajan Member   Registered: Jun 2014 Posts: 108 Original Poster Rep: Thanks once again. For clear explanation.
10-03-2015, 06:31 AM   #12
JeremyBoden
Senior Member

Registered: Nov 2011
Distribution: Debian
Posts: 1,038

Rep:
Quote:
 Originally Posted by grail Just to be clear ... any number to the power of 0 is 1
Except 0 to the power 0, which isn't defined.

10-03-2015, 06:53 AM   #13
273

Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,387

Rep:
Quote:
 Originally Posted by JeremyBoden Except 0 to the power 0, which isn't defined.
I thought it was your mother's mother?
(Sorry, very poor joke I felt compelled to make.)

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post mitchell7man General 75 05-31-2009 07:19 AM SlowCoder Fedora 5 02-24-2009 03:58 AM ErrorBound Linux - Server 2 05-08-2007 08:59 PM Squall LQ Suggestions & Feedback 3 09-02-2004 07:42 PM kubicon Linux - Networking 4 02-02-2004 12:46 PM

All times are GMT -5. The time now is 06:05 PM.

 Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -