Re: Is 1111 1110 10 equal to 0xfe80 or 0x3fa?

Warren Kumari <warren@kumari.net> Sat, 15 June 2019 18:24 UTC

Return-Path: <warren@kumari.net>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D3E63120075 for <ipv6@ietfa.amsl.com>; Sat, 15 Jun 2019 11:24:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=kumari-net.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wMJSK51eQWGS for <ipv6@ietfa.amsl.com>; Sat, 15 Jun 2019 11:24:00 -0700 (PDT)
Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 27212120019 for <ipv6@ietf.org>; Sat, 15 Jun 2019 11:24:00 -0700 (PDT)
Received: by mail-qk1-x732.google.com with SMTP id d15so3814406qkl.4 for <ipv6@ietf.org>; Sat, 15 Jun 2019 11:24:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kumari-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4cBms3Bw+HBAlENMpKtB7ynEj+dYi/IzXXbttlIeeRo=; b=ZB4RbQ280zbme2wucpF7rf6A286iOI+yuQ7jDp9iZaRzZI/VF2i9ZcNynC9pXmWRSR Vgee9kVm/hXSXaxjF1upWOgIvtGBMaT8O0ugm8otxC0N3OTv92utUFRCjSf92BmiKpKP MJWawEqJM+5I/EX51ne5LYtcsjvYay9Nii8XLgMPdkUKhFbkQPSyQj/PqPGKRkoV8AFy wz6hZ8MUBaxC+pHogP/N/ob/Dv0jUV06Ux5BtE1+YAm5/E5N+Vk9zE2QUnX/J9zht7JJ U2tVaIIyzZyTHRuQMe1IWyoyJnM341X2br/c/tCdl/R7U6glX+5kVwdid3YUlYQpAIjn ayfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4cBms3Bw+HBAlENMpKtB7ynEj+dYi/IzXXbttlIeeRo=; b=mYrvxmwpQbUtfJG9xz+XcCWsHimRVbSxNRuMlEwxTQsikgaQyGD74q6yLKW+FR+T2w itsek4bkE8QOiq+JEylFBYygNyXrGchtUGCf8Mx+2BVNj4UxH3A2uaN5+vAipcQ1LUx5 PrRVLVmoGcovuRleHo7UJIYbgTdeyfE5WdBDbV4kK4QtmgjzD0I4QYxNzzNezaetw09+ pYIhuyj6C9LYUZFotauXCu/2GyMeYN470HeGlezighHmMv1csBKdtBMPMMJUE/HI1pvH iXz4WPRpzT1sPAeAASFwi+eIjg7vYEcHKjRT7iApK1RHARNFSb/aRHQD0H48VOPCys0h K0OQ==
X-Gm-Message-State: APjAAAXYMNE8ofHihJQlQUaWaNQSLBC0gx9x0y4Du/nMlCH5Fr/jQms9 waWDAneuQrwrUMAGwxSAF0MapbcZxoIyUPfCgAApdQ==
X-Google-Smtp-Source: APXvYqzqDOzd2GfBRI78g+zgBmqWnQhOlfv+v6/4fCCI/DTYoS1r5Wz+AdWu8qlwkEAPZ7OnM1nVgE7lGfpyAUNKHVY=
X-Received: by 2002:a37:aa4d:: with SMTP id t74mr83423089qke.144.1560623038672; Sat, 15 Jun 2019 11:23:58 -0700 (PDT)
MIME-Version: 1.0
References: <a71b00b7-0e0c-242a-b3f7-147f4c6b2eb0@gmail.com> <D05C857F-42F6-4F17-8520-A0BF4C8FB775@steffann.nl> <CAHw9_i+U90wczYJ9RwBnzqCd09qfjoPBhNv5sH_wRHfJ9RkGjQ@mail.gmail.com> <e0d8f4a9-848e-ff8f-0031-ed8afa100560@gmail.com> <CAHw9_iLmfv0zJEwn_0yHo5wi9Bj+S5huXzQ3DxvnXmDGMHcnFg@mail.gmail.com>
In-Reply-To: <CAHw9_iLmfv0zJEwn_0yHo5wi9Bj+S5huXzQ3DxvnXmDGMHcnFg@mail.gmail.com>
From: Warren Kumari <warren@kumari.net>
Date: Sat, 15 Jun 2019 14:23:22 -0400
Message-ID: <CAHw9_i+66gpOO+MyWcah5_OTeWZ75LhYd2jT4OF5vf3PWbBosw@mail.gmail.com>
Subject: Re: Is 1111 1110 10 equal to 0xfe80 or 0x3fa?
To: Alexandre Petrescu <alexandre.petrescu@gmail.com>
Cc: Sander Steffann <sander@steffann.nl>, IPv6 <ipv6@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/3nnlVRl_MnKJJ_QBZRBanVBr4V4>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 15 Jun 2019 18:24:03 -0000

On Sat, Jun 15, 2019 at 1:28 PM Warren Kumari <warren@kumari.net> wrote:
>
>  ' i
>
> On Sat, Jun 15, 2019 at 10:59 AM Alexandre Petrescu
> <alexandre.petrescu@gmail.com> wrote:
> >
> >
> >
> > Le 06/06/2019 à 22:17, Warren Kumari a écrit :
> > > On Thu, Jun 6, 2019 at 2:46 PM Sander Steffann <sander@steffann.nl> wrote:
> > >>
> > >> Hi Alexandre,
> > >>
> > >>> I maintain that 1111 1110 10 equals 0x3fa, because that's what my Windows Calculator says: I type 1111 1110 10 and it converts to 0x3fa.
> > >>>
> > >>> On another hand, I am rhetorically asked how can 1111 1110 10 be 0x3fa?
> > >>>
> > >>> (the 1111 1110 10 are the 10 leading bits of the IPv6 link local addresses, which is familiarly known to start with an fe80).
> > >>>
> > >>> On my side, this is a difficulty to understand this 0xfe80, especially since 1111 1110 10 is so printed in Figure in RFC4291.
> > >>
> > >> It's a prefix of an IPv6 address. IPv6 addresses are 128 bits long. Expand to 128 bits and try again :)
> > >>
> > >> 1111 1110 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 equals 0xfe800000000000000000000000000000. Not sure if Windows Calculator can handle that though…
> > >
> > > Windows calc probably can't, but:
> > > $ echo 'print hex(0b1111111010 << (128-10))'  | python
> > >
> > > or https://repl.it/repls/AwareDecentGeeklog if you don't have Python
> > > (because windows :-p)
> >
> > For sake of completeness, google puts '1111111010 in hex' as 0x423A3562.
>
> Your point?
> One billion, one hundred and eleven million, one hundred and eleven
> thousand and ten is, in fact, 0x423A3562
> In exactly the same way, if you enter '1+1' it gives you 2, and not 0b10.
>
> Perhaps you actually meant "0b1111111010  to hex", which it correctly
> converts to 0x3FA.
>
> A number of people have (in my opinion very politely) suggested that
> you spend some time reading up on subnetting. I'd second this
> recommendation, and suggest "Internet Routing Architectures" by Sam
> Halabi (http://www.ciscopress.com/store/internet-routing-architectures-9781578702336
> ) - while it was written in 2000, and is focused on IPv4, the concept
> is *exactly* the same.
>
> I suspect that, at this point, I'm simply being trolled --

Apologize - I lost my cool, accusing someone of trolling is not OK; I
apologize, it was wrong of me.

Sorry,
W

> unfortunately though, as the Operations AD I often have to counter the
> accusation that the IETF is detached from operations and doesn't
> understand how protocols we design are used -- this thread fully plays
> into that.
>
> W
>
> >
> > qwant does not convert it.
> >
> > Alex
> >
> > >
> > > W
> > >>
> > >> Cheers,
> > >> Sander
> > >>
> > >> --------------------------------------------------------------------
> > >> IETF IPv6 working group mailing list
> > >> ipv6@ietf.org
> > >> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> > >> --------------------------------------------------------------------
> > >
> > >
> > >
>
>
>
> --
> I don't think the execution is relevant when it was obviously a bad
> idea in the first place.
> This is like putting rabid weasels in your pants, and later expressing
> regret at having chosen those particular rabid weasels and that pair
> of pants.
>    ---maf



-- 
I don't think the execution is relevant when it was obviously a bad
idea in the first place.
This is like putting rabid weasels in your pants, and later expressing
regret at having chosen those particular rabid weasels and that pair
of pants.
   ---maf