Conversation

in modern day we generally agree that a byte is 8 bits and a nybble is 4 bits

i don’t think we have consistent naming for larger sizes

consider 32 bits:

  • dword on x86
  • word on arm
  • single in IEEE 754 land

we don’t really have a consistent word for “128 bit thing”, which is what i want to name

i want to call it a quad because that’s what arm and fp people would call it, but that could be confused with qword

5
0
0

@87flowers i don’t think we really need very “consistent naming here” because at some point you get diminishing returns. a byte is the fundamental unit of memory access and a nybble is often useful as half that because it corresponds to a hex digit, which is super common.

you could call them “4 bits” and “8 bits” but that genuinely misses the context of these being computer sized things that are not just literally that many bits. a byte is more fundamental than a bit in some ways, even though yes it does literally consist of 8 bits.

but higher up? there isn’t necessarily much benefit to giving those sizes unique names. it’s just something to memorize for no good benefit. yes we have binary prefixes to make very large multiples wieldy to say. but if we have a snack, course, meal, buffet then like. you just have to memorize what each one means? when we could just say 2 bytes, 4 bytes, 8 bytes, 16 bytes. those are perfectly good enough short names. if we’re talking about integers of those sizes (where the bit count really matters), i really like Rust/LLVM/Zig’s nomenclature u16, u32, u64, u128. it’s particularly unambiguous and concise.

1
0
0

the 1995 IEEE standard for a 32-bit microprocessor gaves the names doublets, quadlets, octlets and hexlets as 2, 4, 8 and 16 bytes respectively

1
0
0

twobyte
quadbyte
octbyte
hexbyte

are probably more modernly understandable

2
0
0

@87flowers make new byte-style words

snack (16 bits), course (32 bits), meal (64 bits), buffet (128 bits)

2
0
0

(twohexbyte, quadhexbyte, octhexbyte, what is 256 bytes)

2
0
0

@syn i think historical names were

  • chawmp (16 bits or 18 bits)
  • gawble (32 bits or 48 bits)
0
0
0

paglet (reference to 256 bytes being page size on 8 bit micros)

0
0
0

@sodiboo @87flowers nybble pretty much only exists because a bunch of nerds liked that pun a lot. byte doesn’t technically have a fixed width (it’s almost always 8 except when it isn’t), and nybble only works with 8 bit bytes. (when bytes were commonly 9 bits they were split into 3 octal digits instead of 2 hexadecimal digits)

the word/dword/hword/qword etc namings are hardware specific, arm never had a word size of 16 bit whereas x86 did

single/double is more an informal name to refer to binary32 and binary64 floating point numbers

1
0
2

@charlotte @87flowers

nybble pretty much only exists because a bunch of nerds liked that pun a lot

honestly yeah i agree. we could totally do without it. but it does have some utility. in particular, somewhat tangential to Real Computer Science, it’s a common term in minecraft redstone, because a nybble is the fundamental unit of information (really, this is what byte was supposed to mean, but like, lmao, no, a byte is always 8 bits now, using it for any other quantity is just confusing)

2
0
0

@sodiboo @87flowers

no, a byte is always 8 bits now, using it for any other quantity is just confusing

english does have “octet” as an unambiguous way to refer to 8 bit bytes but i cannot blame computer folks for having a biting kink. the word is used for things like IETF specs or in languages like french

1
0
1

@charlotte @87flowers octet is too many syllables for the fundamental unqualified unit !

2
0
0

@sodiboo @87flowers nobody uses octal anymore except for deeply unserious operating systems so it’s fine

0
0
1

@charlotte @87flowers
16-oct —[o365_excel_woozy]–> 16th of October

1
0
0

@sodiboo @charlotte i just feel that 16 bytes is a common vector size that needs a consistent name

1
0
0

@sodiboo @87flowers also you know metric folks have been dealing with “kilogram” which has even more syllables

1
0
1

@87flowers @sodiboo imo it matters mainly at a systems programming level, where there are more important distinctions to make (like yeah the vector is 128 bits wide, but what does it contain? is this a scalable vector? Are there larger fixed size variants?) and at a higher level you kinda don’t touch them at all

1
0
1

@charlotte @sodiboo i’m talking about a 16 byte sized object, not a vector itself

i currently call an operation zip_within_128bits which is implemented on a generic vector<T, N> as part of a portable SIMD library

this thought was born out of thinking “what if there is a better word than 128 bits”

1
0
0

@87flowers @sodiboo like to continue with the trend with word/dword/hword/etc you could call them xmmword. which is probably a lot more opaque than just saying “128 bit object”

1
0
1

@charlotte @sodiboo this is not x86-64 specific, but supports arm/risc-v/loongarch, and xmmword implies x64

1
0
0

@87flowers @sodiboo dword for 32 bits similarly implies x64

1
0
1

@87flowers @sodiboo like basically i think even if you were to make a consistent name for common vector sizes, i think they would end up being more opaque and confusing than labelling it either by bit width or actual type used

0
0
1

@charlotte @87flowers Yeah but we’re computer people. We don’t like the metric system. Fucks up our units. Fuckin kilobytes and megabytes . screw those units

1
0
0

@syn @87flowers i really like snyck and myl. those almost don’t sound made up

1
0
0

@sodiboo @charlotte @87flowers 1 megabyte ~= 1,049 tons of octets

0
0
1