Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #258638

Re: netmask question

From Dan Purgert <dan@djph.net>
Newsgroups linux.debian.user
Subject Re: netmask question
Date 2023-05-23 14:20 +0200
Message-ID <Gyz9D-aSWQ-7@gated-at.bofh.it> (permalink)
References (3 earlier) <Gygql-aHpq-1@gated-at.bofh.it> <Gyj4R-aJ3P-7@gated-at.bofh.it> <GynrP-aLuC-1@gated-at.bofh.it> <GyoQV-aMrM-5@gated-at.bofh.it> <GyxKx-aRVE-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On May 23, 2023, debian-user@howorth.org.uk wrote:
> Dan Purgert <dan@djph.net> wrote:
> > On May 22, 2023, gene heskett wrote:
> > > I don't see it, 255 is all 8 bits set, 256 is all 8 bits cleared
> > > and carry set.  
> > 
> > In "natural counting", 2^8 is 256.  (1, 2, 3, 4, ... , 256).
> 
> In any counting, 2^8 is 256. "2^8 is 256" is just a way of saying in
> English the same as the assertion "2^8 == 256" in a programming
> language. They are exactly the same statement. And they are true.
> That's all Tomas was saying.

I explicitly mentioned natural counting, since we don't order objects
from zero (e.g. objects on a table are counted as  "1,2,3,4,5", not
"0,1,2,3,4").  You still get 256 total values in binary counting, it's
just that the set of values is offset by a count of one from the
position where they fall in the set.  

That is, the value of "zero" is at the "first position" (likewise, the
value 255 is at the 256th position).
 
> And yes you need 9 bits in binary to say it.

You only need 9 bits if you want to display some (decimal) value that
would fit in the 257th - 512th position of a computer's zero-based
counting system (i.e. 256-511).

-- 
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

netmask question coreyh@free.fr - 2023-05-22 04:50 +0200
  Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 05:00 +0200
    Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 09:50 +0200
      Re: netmask question <tomas@tuxteam.de> - 2023-05-22 10:10 +0200
      Re: netmask question coreyh@free.fr - 2023-05-22 11:00 +0200
        Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 11:10 +0200
          Re: netmask question coreyh@free.fr - 2023-05-22 12:20 +0200
            Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:30 +0200
            Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-22 13:10 +0200
      Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:20 +0200
        Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 12:30 +0200
        Re: netmask question <tomas@tuxteam.de> - 2023-05-22 13:10 +0200
  Re: netmask question Charles Curley <charlescurley@charlescurley.com> - 2023-05-22 05:10 +0200
  Re: netmask question <tomas@tuxteam.de> - 2023-05-22 07:00 +0200
    Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 09:40 +0200
      Re: netmask question <tomas@tuxteam.de> - 2023-05-22 10:00 +0200
      Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:20 +0200
      Re: netmask question gene heskett <gheskett@shentel.net> - 2023-05-22 18:20 +0200
        Re: netmask question <tomas@tuxteam.de> - 2023-05-22 21:10 +0200
          Re: netmask question gene heskett <gheskett@shentel.net> - 2023-05-23 01:50 +0200
            Re: netmask question Dan Purgert <dan@djph.net> - 2023-05-23 03:20 +0200
              Re: netmask question debian-user@howorth.org.uk - 2023-05-23 12:50 +0200
                Re: netmask question Dan Purgert <dan@djph.net> - 2023-05-23 14:20 +0200
            Re: netmask question tomas@tuxteam.de - 2023-05-23 07:00 +0200
          Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 01:50 +0200
            Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-23 02:10 +0200
              Re: netmask question <tomas@tuxteam.de> - 2023-05-23 06:40 +0200
            Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 02:30 +0200
              Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 02:30 +0200
                Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 02:50 +0200
                Re: netmask question <tomas@tuxteam.de> - 2023-05-23 06:50 +0200
                Re: netmask question Andy Smith <andy@strugglers.net> - 2023-05-27 03:10 +0200
                Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-27 03:10 +0200
                Re: netmask question Andy Smith <andy@strugglers.net> - 2023-05-27 03:20 +0200
                Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-23 02:50 +0200
                Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 03:00 +0200
                Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 03:20 +0200
                Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-23 08:30 +0200
                Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-23 02:50 +0200

csiph-web