Lecture 7/12: Storing Numbers in Memory and Byte Ordering

  Рет қаралды 47,465

hhp3

hhp3

Күн бұрын

Prof. Harry Porter
Portland State University
cs.pdx.edu/~harry

Пікірлер: 36
@tcmata11
@tcmata11 9 жыл бұрын
Great videos. Drawn out figures make it much easier to comprehend. Learned more in these 15 minutes, than I have in 3 hours in my assembly language lecture
@bik8353
@bik8353 6 жыл бұрын
Mr. Harry Potter does his magic once again. Thank you SO much
@MulleDK19
@MulleDK19 7 жыл бұрын
From a technical standpoint, little endian makes the most sense. It ensures that no matter the size of the value, the least significant byte, is always the same address. So eg. accessing a value as a short or a byte will access the same address, not having to offset. B = Big endian L = Little endian 0 1 2 3 B: 00 00 00 FF
@karthikbahaddurgattematha4651
@karthikbahaddurgattematha4651 9 ай бұрын
I loved her... very good .... with a good example... thanks a lot
@COMB0RICO
@COMB0RICO 6 жыл бұрын
Excellent teaching! Thanks from Texas.
@hariboi991
@hariboi991 4 жыл бұрын
This helped tons! Thanks a lot for the clear explanations and nice examples!
@TheDuckofDoom.
@TheDuckofDoom. 7 жыл бұрын
Small definition-accuracy issue, the meaning and length of a "word" varies with the operating system, machine architecture, and programming language. Some use 2-bytes as the definition(and the bits per byte can depend on the machine, a few have used 9 or 12bit bytes over the years) others use the max atomic capacity of the CPU eg 64bits on a 64bit CPU. x86 assembly still uses 16bits due to the 16bit 8086 and 80286 origin of the x86[_64] instruction set.
@chuckdudley
@chuckdudley 4 жыл бұрын
exactly - thank you
@guliyevshahriyar
@guliyevshahriyar Жыл бұрын
Thank you very much
@johntabor2619
@johntabor2619 2 жыл бұрын
Thanks for sharing
@vineeshcv
@vineeshcv 3 жыл бұрын
Thanks for the explanation, this is really good explanation about endianess
@anondoggo
@anondoggo 4 жыл бұрын
Sorry if I'm wrong, but I think in the examples, the addresses used to store the data are not aligned? (just wanted to check my concept, thank you!
@LeeHongYee99
@LeeHongYee99 8 жыл бұрын
Very good lecture, more people should view.
@문창민-f2k
@문창민-f2k 5 жыл бұрын
16:30 Why characters have a same output? ㅡㅡ I see now. Endian is matter about a data type like int, word etc, not a combination of data type. So a single char is endianness.
@mehrdadkiani8476
@mehrdadkiani8476 4 жыл бұрын
I wish I was one of your students, Professor Harry Porter.
@roschoandrew5440
@roschoandrew5440 5 жыл бұрын
Very good explanations there.
@Zeropadd
@Zeropadd Жыл бұрын
💖
@lnsights
@lnsights 8 жыл бұрын
nice lecture......easy to understand
@laoying20
@laoying20 4 жыл бұрын
Hello Prof. Harry Porter, good day thanks for your video. it helped me a lot. I want to know everything about computer Memory & CPU. can you please introduce me a book or any other resources? Appreciate a lot.
@billmichae
@billmichae 2 жыл бұрын
Double Word is called LONG WORD
@ShabaazShaikz
@ShabaazShaikz 4 жыл бұрын
Good information
@hadeseye2297
@hadeseye2297 Жыл бұрын
I can't agree with you on the word size. It's architecture dependant. For 8 bit cpus its width is 8 bits. Other than that, nice you use C. This way people can look into memory, rather than rely on runtime environment and words of the authors of books, or tutorials.
@blank336
@blank336 6 жыл бұрын
Would be great if someone can clarify if I understood this least sig byte & most sig byte correctly; for example given in the video, 32-bit Integer value is 0x01234567 with big-endian being 01 23 45 67 and little-endian being 67 45 23 01. If the 32-bit Integer value happened to be 0x87654321 instead, would the big-endian be 87 65 43 21 and little-endian being 21 43 65 87? Thanks in advance.
@billmichae
@billmichae 2 жыл бұрын
Half Byte is a Nibble
@kingnehmna7810
@kingnehmna7810 4 жыл бұрын
thank you
@catlord69
@catlord69 5 жыл бұрын
pretty sure "sizeof" function is in standard library
@hhp3
@hhp3 5 жыл бұрын
Actually, “sizeof” is built directly in to the C and C++ languages. It is a unary operator, like + and - . It is not a function, and it not included from a library. For example, you can say “sizeof buffer” although most programmers write “sizeof ( buffer )” instead. Note that you can’t leave off the parentheses for normal functions, so “foo ( buffer )” cannot be written as “foo buffer”.
@yank3656
@yank3656 4 жыл бұрын
thanks for sharing hhp3
@Manoj_1102
@Manoj_1102 6 жыл бұрын
Please correct it , Word contain 16 bits (2 Byte) while Dword contain 32 bits (4 byte) and so on...
@CR-um6bb
@CR-um6bb 6 жыл бұрын
What is the 0x for??
@blank336
@blank336 6 жыл бұрын
I believe its a C format for saying that its hexadecimal. Not sure if this definition is correct, just from an unstable memory of a dude that started learning :)
@giuseppeatanasio2926
@giuseppeatanasio2926 6 жыл бұрын
0x means Hexadecimal. So, every character before the 0x is an hexadecimal number
@idafeoghene6984
@idafeoghene6984 6 жыл бұрын
I thought a WORD is 16bits
@rickicalder9267
@rickicalder9267 4 жыл бұрын
Correct according to Intel and most electrical engineering courses a Word is exactly 16 bits. cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/IntelDataType.pdf
@japhethobala3753
@japhethobala3753 4 жыл бұрын
It depends with the architecture of the machine. The bit-iness of the cpu defines how many bits exists in a word this is because the CPU operates on a word. So a 16 bit machine has words of size 16 bits, a 32 bit machine has words of size 32 bits so on and so forth.
@AlqGo
@AlqGo 8 жыл бұрын
&ip is a pointer to a pointer but it matters not for the purpose of your video
Lecture 12/12: ASCII and Unicode
47:44
hhp3
Рет қаралды 36 М.
Lecture 1/12: Bits and Binary Numbers
12:45
hhp3
Рет қаралды 61 М.
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 37 МЛН
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 3,9 МЛН
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 35 МЛН
Lecture 3/12: Bits, Bytes and Words
15:07
hhp3
Рет қаралды 147 М.
Where did Bytes Come From? - Computerphile
11:31
Computerphile
Рет қаралды 476 М.
EEPROM Memory - Store Anything - Arduino101
13:16
Electronoobs
Рет қаралды 105 М.
Bits vs Bytes as Fast As Possible
4:27
Techquickie
Рет қаралды 342 М.
What's The Longest Word You Can Write With Seven-Segment Displays?
8:56
Quest To Find The Largest Number
11:43
CodeParade
Рет қаралды 420 М.
How do computers store images?
8:31
Udacity
Рет қаралды 377 М.
Memory & Data, Video 3: Memory addresses
9:28
Luis Ceze
Рет қаралды 29 М.
Why do programmers use hexadecimal numbers?
8:41
Jacob Sorber
Рет қаралды 57 М.
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 37 МЛН