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

Sander Steffann <sander@steffann.nl> Thu, 06 June 2019 18:46 UTC

Return-Path: <sander@steffann.nl>
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 9864E120094 for <ipv6@ietfa.amsl.com>; Thu, 6 Jun 2019 11:46:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.3
X-Spam-Level:
X-Spam-Status: No, score=-4.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=steffann.nl
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 nngiivga9wXJ for <ipv6@ietfa.amsl.com>; Thu, 6 Jun 2019 11:46:34 -0700 (PDT)
Received: from mail.sintact.nl (mail.sintact.nl [83.247.10.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 863B3120111 for <ipv6@ietf.org>; Thu, 6 Jun 2019 11:46:33 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.sintact.nl (Postfix) with ESMTP id 41A5649; Thu, 6 Jun 2019 20:46:31 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=steffann.nl; h= x-mailer:references:in-reply-to:date:date:subject:subject :mime-version:content-type:content-type:message-id:from:from :received:received; s=mail; t=1559846788; bh=GTFtVZuD6Y9F9XkCtZo GwyQBZl2agQonJbJ0Xm0cqB0=; b=Dwliy3sXHsSYI5dDJQXt5abCE2Z4/GJJlhm zodwCWO7wwccnR8kCcCPbNUUPolISaXbU8OLaH1rblGC4m9F3iEv2sLeYoWoZoem 89iRwbwtqcQo3JIQzgPyZe1cp/rbT5ImcrhB1fuAcvTISpCSfGch2NTqVZADamzD I55AcBYU=
X-Virus-Scanned: Debian amavisd-new at mail.sintact.nl
Received: from mail.sintact.nl ([127.0.0.1]) by localhost (mail.sintact.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id by1DljTr6C9x; Thu, 6 Jun 2019 20:46:28 +0200 (CEST)
Received: from [IPv6:2a02:a213:a300:ce80:f9c0:5614:e986:5e24] (unknown [IPv6:2a02:a213:a300:ce80:f9c0:5614:e986:5e24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.sintact.nl (Postfix) with ESMTPSA id 97F4E3C; Thu, 6 Jun 2019 20:46:28 +0200 (CEST)
X-Clacks-Overhead: GNU Terry Pratchett
From: Sander Steffann <sander@steffann.nl>
Message-Id: <D05C857F-42F6-4F17-8520-A0BF4C8FB775@steffann.nl>
Content-Type: multipart/signed; boundary="Apple-Mail=_D5B12719-53D0-4F82-B22A-5A4F27F8F5DD"; protocol="application/pgp-signature"; micalg="pgp-sha256"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Subject: Re: Is 1111 1110 10 equal to 0xfe80 or 0x3fa?
Date: Thu, 06 Jun 2019 20:46:28 +0200
In-Reply-To: <a71b00b7-0e0c-242a-b3f7-147f4c6b2eb0@gmail.com>
Cc: IPv6 <ipv6@ietf.org>
To: Alexandre Petrescu <alexandre.petrescu@gmail.com>
References: <a71b00b7-0e0c-242a-b3f7-147f4c6b2eb0@gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/3-BD1yuox5SdwEmHz-9q0lsdjWg>
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: Thu, 06 Jun 2019 18:46:37 -0000

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…

Cheers,
Sander