Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained

Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained

Get a clear, fun breakdown of data sizes in x86-64 CPUs! This video covers bytes (8 bits), words (16 bits), D words (32 bits), and quad words (64 bits), plus how they fit into assembly and CPU registers. Perfect for programmers, students, or anyone curious about low-level computing. I’ll walk you through the basics with relatable examples, no jargon overload. Subscribe for more coding & tech videos, and scan the QR code to visit my site for extra tutorials! Leave a comment with your thoughts!

Introduction 00:00:00
Data Sizes Overview 00:00:01
Byte Definition 00:00:44
Bits to Bytes Conversion 00:01:27
Word Size Explanation 00:02:20
Double Word (D Word) 00:04:03
Quad Word Definition 00:04:44
CPU Registers and Memory 00:05:21
Conclusion and Outro 00:06:07
Call to Action 00:06:32

Thanks for watching!

Find us on other social media here:

  • https://www.NeuralLantern.com/social

Please help support us!

  • Subscribing + Sharing on Social Media
  • Leaving a comment or suggestion
  • Subscribing to our Blog
  • Watching the main “pinned” video of this channel for offers and extras

Hello there.

I’d like to talk to you about data sizes within the context of x86,

64 CPUs,

just like 64 bit CPUs for assembly and just whatever.

So what’s going on inside of the machine and how do we describe the sizes of

various clumps of data? So for starters, you know,

of your computer, there’s just a bunch of ones and zeros represented in all the wires,

in all the circuitry.

The human beings with feelings decide, oh, you know, I’m going to take a group of this

many bits, this many ones and zeros, and I’m going to say that it is something else.

I’m going to call it an abstract unit.

So the first thing that we do is we have something called a byte.

That just means eight bits.

So we can say one byte equals eight bits.

equals eight bits. I don’t know why I hit the shift key there. That’s probably going to mess

up my annotator. Nope. Okay. So what is eight bits? Just as a little reminder, you know, we’ll

just say one, two, three, four, five, six, seven, eight, or it could be, you know, something more

random looking one, two, three, four, five, six, seven, eight, you know, so like inside of the

machine, we have eight ones and zeros for eight bits. And when we group them together, we’ll just

Okay, no problem.

So that means by the way, if somebody says,

oh, my internet connection is this many megabits a second.

If you wanna know how many bytes a second,

try dividing by eight.

Or if somebody says I have this many megabytes a second

of transfer speed, try dividing that by eight.

You know, so multiply or divide by eight

to get the right number.

Okay, so if we had two bytes together,

that’s just gonna be 16 bits.

No problem there.

I’m just going to copy paste these bits and you don’t have to do this.

But for me personally, I like to put a little space in between bite groupings just to help

my human brain kind of see, oh, I’m looking at two bites right here when I’m referring

to different data sizes.

So then eventually we kind of need an idea of, you know, let’s come up with a different

word that means more than one bite.

ironically based on what I just said the the term we’re going to use is word a word

the size of a word just kind of depends on the system that you’re on on my system

the size of a word is two bytes so I’m going to say one word equals two bytes

and you can imagine that’s 16 bits maybe I should start doing the double equal sign here just to be

Okay, so equals two bytes.

It also equals 16 bits.

And you can imagine it’s basically the same thing

that we just wrote up above.

So I’m gonna erase this actually, 16.

Oh, I put an E there, embarrassing.

Okay, so one word is two bytes.

Again, the size of a word depends on your system.

If you’re not sure, you should probably look it up.

What’s the word size on my system?

But again, the typical system here in 2024

6664 machines running Ubuntu, um, or just like Linux is going to be like, you know,

two bytes. Okay. So now, uh, we have like words that we can do. So if I had, uh,

let’s say I had two words, uh, two words is going to be double of what we just wrote. Right. So

that means we’re going to have this many, whoops, I blew it. We’re going to have this many bits.

So two words, two words is going to be equal to, um, 32 bits.

And it’s also going to be equal to four bytes because, you know, we multiplied everything

by two.

So this is like four bytes.

So now we need another term to represent this two words, which is four bytes, which

is 32 bits.

We can also call that a D word.

Actually, I’ll say D word like that.

And what does D word mean?

is twice the size of the word length on your system.

So like if we decided our word length is two bytes,

then a D word is four bytes and that’s it.

Four bytes is 32 bits.

You might notice this is similar to like old school CPUs

that ran in 32 bits and maxed out their RAM

at about four gigabytes.

So let’s come up with one more term here.

Let’s come up with the term quad word.

Actually, we’re not coming up with the term.

We’re just using it.

What is a quad word?

A quad word is two D words.

So we’re just kind of doubling it again.

I forgot that extra equal sign there.

Quad word is two D words, which means it’s also four words.

And it also means it’s eight bytes.

64 bits.

And then I guess if I want to represent this to you,

I can just kind of like copy paste that twice.

And this is the size of the memory address space that we have on modern CPUs.

This is also the size of your general purpose registers in modern 64-bit CPUs.

So if somebody says, hey, I got a quad word.

I want you to store it somewhere.

You can instantly think to yourself, well, obviously I could put it in memory.

I could put it in memory.

You could also just put it directly into a CPU register.

And that’s it.

This also means that you could put two D words into one CPU register if you were very clever.

You could also do the same thing.

You could put like four words inside of one CPU register.

Because the CPU registers, they’re always the same size no matter how you use them.

They’re kind of hardwired.

So I hope this has been, you know, kind of helpful.

These are the basics of different data type sizes that we have in CPUs and

assembly language. I’ll see you in the next video.

Hey everybody. Thanks for watching this video again from the bottom of my heart.

I really appreciate it. I do hope you did learn something and have some fun.

If you could do me a please, a small little favor,

Follow this channel or these videos or whatever it is you do on the current social media website that you’re looking at right now

It would really mean the world to me and it’ll help make more videos and grow this community

So we’ll be able to do more videos longer videos better videos or just I’ll be able to keep making videos in general

So, please do do me a kindness and and subscribe

You know sometimes I’m sleeping in the middle of the night and I just wake up because I know somebody subscribed or followed

and I get filled with joy. That’s exactly what happens every single time. So you could do it as

a nice favor to me, or you could, you could troll me if you want to just wake me up in the middle

of the night, just subscribe. And then I’ll, I’ll just wake up. I promise that’s what will happen.

Also, uh, if you look at the middle of the screen right now, you should see a QR code,

which you can scan in order to go to the website, which I think is also named somewhere at the

bottom of this video. And it’ll take you to my main website where you can just kind of like see

and tutorials and things that I offer and all that good stuff and if you have a suggestion for

clarifications or errata or just future videos that you want to see please leave a comment or

if you just want to say hey what’s up what’s going on you know just send me a comment whatever I also

wake up for those in the middle of the night I get I wake up in a cold sweat and I’m like this

it would really it really mean the world to me I would really appreciate it so again thank you so

thank you so much for watching this video and enjoy the cool music as as i fade into the

darkness which is coming for us all

Thank you.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply