Memory Flashcards
What is a decimal system?
a base-10 to represent numbers ( 0,1,2,3,4,5,6,7,8,9) and combining those to create larger numbers.
What is the Binary system?
A base-2 to represent values. Only values used in this system are 0 and 1
What is the Hexadecimal System
The hexadecimal system, aka base-16, is a much more concise way to express the data on a computer’s system. (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f)
Why is hexadecimal more concise to express computer data?
Hexadecimal makes this mapping easy because a group of 4 binary digits (bits) is able has 16 different combinations, and each of those combinations maps to a single hexadecimal digit.
1 byte = ?? bits
1 byte = 8 byte
What is a nibble
a Nibble = 4 bits and equals one hexadecimal unit
How many bits is an integer
an integer is 32 bits (= 4 bytes)
The max value = 2.147.483.647 because this is the maximum number reachable with 32 bits
How many bits is a Long
a Long is 64 bits (= 8 bytes)
Max value = 9,223,372,036,854,775,807
How many bits is float
an float is 32 bits (= 4 bytes)
How many bits is a char
a char is 16 bits (=2 bytes)
It ranges from 0 to 65.535
can be used with uni-code
What is overflow?
Trying to store a larger number than is possible in a datatype.
For example 3.000.000.000 in an integer
What is a pointer in C
Adress to a memory location where an object is stored
How to check with C what the value in a memory adress is
& — If x is an int-type variable, then &x is a pointer-to-int whose value is the address of x.
What does ‘*’ do for a pointer in C
Go To memory adress - It “goes to the reference” and accesses the data at that memory location, allowing you to manipulate it at will.
This is just like visiting your neighbor. Having their address isn’t enough. You need to go tothe address and only then can you interact with them.
What is a call stack?
When you call a function, the system sets aside space in memory for that function to do its necessary work. Those chunck of memory we call stack frames or function frames.
Those function are stored in a call stack