Linear Algie:
- Take the tests during the semester [ ]
Organic Chemistry:
- Do good in the last 2 labs [ ]
- Study here [ ]
- Write down all the substances [ ]
- Write down all the reactions [ ]
- Make cheat sheets to practice with [ ]
Biotech:
- Give the missing report [ ]
- Give the new report [ ]
- Voice The Theory before '17 [ ]
- Study right before the exam [ ]
Signals and Systems:
- Finish their practice exercises [ ]
- Read through this [ ]
Statistics:
- Do the online tests [ ]
- Is there matlab exam? [ ]
- Study right before exam [ ]
Management:
- Work on the Ponton thing [ ]
- Keep up with assignments [ ]
- Study right before the exam [ ]
Java and OOP:
Study theory right before exam [ ]
Solve truck [ ]
Solve dinosaur [ ]
Solve something more advanced (optional) [ ]
EE3:
- Do well on the FSM test [ ]
- Don't let the team down [ ]
Electromagnetism:
- Do well in the lab [ ]
- Study before '17 [ ]
- Study right before the exam [ ]
Communication II:
- Follow what's going on [ ]
Thursday, December 1, 2016
Thursday, October 20, 2016
Chem. & S&S Resources!
This website for solved Signals_&_Systems Exercises
This youtube channel for organic chemistry (astonishingly clear explanation of what's going on).
This youtube channel for organic chemistry (astonishingly clear explanation of what's going on).
Wednesday, May 18, 2016
Reminders for Tech Drawing:
- Use a ruler for all the lines and a compass for all the curves.
- Uniform spacing in hatching, 45 or 135 deg
- Name the sections
e.g "section A-A" near the section view
- Don't forget ALL the centerlines
DIMENSIONING
- Placement under or over the dimension line
- Use diameter symbol when needed Φ
- Dimension holes
- Don't dimension hidden lines!
Isometric view:
- The right orientation is the view with the fewest hidden lines!
NOTES FROM SESSION ONE
Standard reducing scales are
1:2, 1:5, 1:10, 1:20, 1:50, 1:100
Standard enlarging scales are
2:1, 5:1, 10:1, 20:1, 50:1, 100:1

FROM SLIDES 2 (Orthographic Projection)
Orthographic projection = parallel and orthogonal projection
- Multiview drawing shows sufficient 2D views of an object.
- Axonometric drawing shows one 3D view



PRESENTATION 3.0 HOW TO ORTHOGRAPHIC VIEW
View selection:
1. Orient the object to the best position relative to a glass box.
2. Select the front view
- The longest dimension of an object should be presented as a width (in a front view)
3. Select adjacent views
Choose the minimum number of views that can represent the major features of the object
ISO, 1st angle view(s) example:



How to Isometric projection :D
___
A parallel line is always parallel to each other regardless of the kind of views, i.e. orthographic and isometric views.
_____
Try to get how this one works:

Monday, February 15, 2016
Friday, January 22, 2016
Maple for the dummie-me (tips for the exam)
# How to put the font & size you like: http://www.maplesoft.com/support/faqs/detail.aspx?sid=87675
# Use 'Tab' when you fill a matrix or a vector to easily jump to the next entry.
# Use 'Tab' to automatically complete the word. For example: RowO+Tab writes 'RowOperation'.
# AnyOperation(A,[α,β],γ) affects α adding β , γ times.
# If you don't remember how to use a command or/and get strange results, use ?LinearAlgebra[command] or just ?command if it's a simple function.
Examples:
?LinearAlgebra[RowOperation]
?exp
# We don't really need to use the subscripts x1 x2 x3.. x1, x2, x3 work too. If he asks, we do it with Shift + -- .
# Use 'Tab' when you fill a matrix or a vector to easily jump to the next entry.
# Use 'Tab' to automatically complete the word. For example: RowO+Tab writes 'RowOperation'.
# AnyOperation(A,[α,β],γ) affects α adding β , γ times.
# If you don't remember how to use a command or/and get strange results, use ?LinearAlgebra[command] or just ?command if it's a simple function.
Examples:
?LinearAlgebra[RowOperation]
?exp
# We don't really need to use the subscripts x1 x2 x3.. x1, x2, x3 work too. If he asks, we do it with Shift + -- .
Sunday, January 17, 2016
Can Cancer Tumors Be Starved to Death?
A Harvard University researcher,
Dr. Judah Folkman, worked on a familiar observation:
Removing a primary tumor often leads to more rapid growth of secondary tumors.
Folkman found two candidate substances/ proteins.
Cutting of cancer cells' supply of food & nutrients literally starves them to death.
So, in order to prevent the growth of competitive tumors, the primary tumor produces angiostatin and endostatin to keep all the resource flow for itself.
That was astonishing!
When a solid tumor grows faster than its blood supply can support, its interior becomes hypoxic (oxygen depleted).
So how does lowering oxygen pressure in a tumor promote blood vessel formation?
The Experiment
The researchers injected HIF-1α null cancer cells into
laboratory mice, wildtype stem cells into a control group of mice.
To compare the null and wild-type cells' ability to form new blood vessels. They examined the mRNA amount of a basic for the vessels formation growth factor.
The researchers found that the null cells formed much smaller tumors than the wildtype cells.
This decrease in the size of tumors produced by null
cells is further supported by the results of the VEGF protein analysis (see graph b above).
Do the angiogenesis inhibitors like angiostatin, in fact inhibit VEGF? Are they good candidates for cancer cures?
Dr. Judah Folkman, worked on a familiar observation:
Removing a primary tumor often leads to more rapid growth of secondary tumors.
Perhaps the primary tumor is produces some substance that inhibits the growth of the other tumors.
Such a substance could be a powerful weapon against cancer.
Folkman found two candidate substances/ proteins.
Angiostatin and Endostatin.
How do they work?
A tumor needs a lot of food & nutrients to grow more cancer cells.
To help its feeding, a tumor leaks out substances that enable the growth of small vessels & capillaries. This growth of blood vessels is called angiogenesis,
Having new vessels achieves a greater flow of blood to the tumor as it grows larger.
Folkman's two cancer inhibitors are angiogenesis inhibitors.
Angiostatin and endostatin kill a tumor by cutting off its blood supply.
Cutting of cancer cells' supply of food & nutrients literally starves them to death.
So, in order to prevent the growth of competitive tumors, the primary tumor produces angiostatin and endostatin to keep all the resource flow for itself.
In laboratory tests the angiogenesis inhibitors shrinked mice tumors to microscopic.
That was astonishing!
Other scientists tried replicate this exciting result. Some
have succeeded, others not.
have succeeded, others not.
Five major laboratories have isolated their own angiogenesis inhibitors and published findings of antitumor activity.
The National Cancer Institute does experiments with angiogenesis inhibitors to human cells.
Preliminary results are encouraging.
While not a cure-all for all cancers, angiogenesis inhibitors seem very effective against some, particularly solid-tumor cancers.
We avidly try to understand how tumors induce angiogenesis.
When a solid tumor grows faster than its blood supply can support, its interior becomes hypoxic (oxygen depleted).
In hypoxia, genes that promote survival under low oxygen pressure are turned on.
Some of these genes increase blood flow to the tumor by promoting angiogenesis.
So how does lowering oxygen pressure in a tumor promote blood vessel formation?
Dr. Randall Johnson of the University of California, San Diego, is studyies the induction of a gene-specific transcription factor (that is, a protein that
activates the transcription of a particular gene) that promotes angiogenesis under hypoxia.
The transcription factor is called HIF-1, for hypoxia inducible
factor-1.
HIF-1 indices the transcription of genes necessary for blood vessel formation.
Molecular Genetics
Primary tumors kill off the competition.
Molecular Genetics
Primary tumors kill off the competition.
Tumors require an ample blood supply to grow.
The growth of new blood vessels is called angiogenesis.
Inhibiting angiogenesis may block tumor growth.
The Experiment
A problem for Johnson and his co-workers was that HIF-1 has many other effects on cell growth.
To get a clear look, the researchers used embryonic stem cells.
Embryonic stem cells are cells harvested from early embryos, before they have differentiated, so they are still capable of unlimited division.
Such stem cells can form tumors when injected into mice.
That all is a good natural laboratory to study how
HIF-1 can influence cancer growth.
HIF-1 can influence cancer growth.
The research team prepared a mutant HIF-1 embryonic stem cell line where the function of the transcription factor encoded by HIF-1 was completely destroyed(null).
Then, grew these HIF-1 null stem cells under hypoxic conditions.
If HIF-1 genes indeed promote angiogenesis and help normal cells grow, these null cells -and so the tumor- wouldn't grow.
The researchers injected HIF-1α null cancer cells into
The injected cells were allowed to grow and form tumors in both null and control hosts (mice).
The tumors that formed were then examined and measured
for differences.
for differences.
To compare the null and wild-type cells' ability to form new blood vessels. They examined the mRNA amount of a basic for the vessels formation growth factor.
This factor is a protein called vascular endothelial growth factor (VEGF).
In parallel studies, antibodies were used to determine levels of VEGF protein.
The Results
The researchers found that the null cells formed much smaller tumors than the wildtype cells.
The effects were more significant over time.
Tumors were five times larger in wildtype cells than in the HIF-1 null cells after 21 days.
Clearly knocking out HIF-1 prevented tumor growth.
This decrease in the size of tumors produced by null
cells is further supported by the results of the VEGF protein analysis (see graph b above).
Under hypoxia, we have more VEGF in wild-type cells
which promote capillary formation to bring more oxygen to the tumor
VEGF protein was much less in null cell tumors, and responded to hypoxia at a lower rate.
Both the decrease in tumor size and the lower level of
VEGF in the HIF-1 null cells support the hypothesis that
HIF-1 plays an essential role in promoting angiogenesis in
a tumor, responding to a hypoxic condition by increasing
the levels of VEGF.
VEGF in the HIF-1 null cells support the hypothesis that
HIF-1 plays an essential role in promoting angiogenesis in
a tumor, responding to a hypoxic condition by increasing
the levels of VEGF.
Do the angiogenesis inhibitors like angiostatin, in fact inhibit VEGF? Are they good candidates for cancer cures?
Exciting findings coming soon, keep pursuing science and leave psychology to the pussies. (kiddin')
How Honeybees Keep Their Cool
How Honeybees Keep Their Cool
Terrestrial organisms are endotherms or exotherms:
Endotherms like birds and mammals maintain their body temperature stable (within a very narrow range).
What happens if there's too much sun?
The Observation
An experiment comparing flight metabolic
rates of African and European honeybees fount that:
The environment temperature keeps changing.
Why is that a problem?
The structures of many of the body’s enzymes and regulatory proteins rely on weak chemical bonds.
A change in temperature can change their shape and disturb their function.
Only a few degrees have a significant impact on metabolism.
Big temperature changes can be fatal.
Terrestrial organisms are endotherms or exotherms:
Endotherms like birds and mammals maintain their body temperature stable (within a very narrow range).
Some invertebrates are also endotherms.
Maintaining a stable body temperature uses up 90% our food intake.
So, since it's so energy-expensive many organisms are ectotherms. Ectotherms can deal with different body temperatures adjusting their activity and metabolism accordingly.
When the weather gets colder butterflies immediately settle to the ground and wait for the sunlight they need to keep
warm enough to fly.
warm enough to fly.
Not the bees.
Bees are one of the few invertebrates that are endotherms.
They keep their body temperature relatively constant.
How does the bee—or any endothermic animal—generate
the heat needed to warm itself?
the heat needed to warm itself?
About 75% of the energy of the chemical bonds in an animal’s food is becoming heat during metabolism anwyay.
So, no we alter the rate of those metabolic reactions to produce less or more heat and regulate our temperature.
When a bee wants to fly, it first shivers violently
for several minutes.
for several minutes.
This burning of glucose generates the heat needed to become airborne.
Then, the flight muscles generate enough heat to maintain the bee’s body temperature good enough to fly.
What happens if there's too much sun?
The butterflies land to shady spots, avoiding sunlight.
But bees keep flying!
How do they avoid overheating?
How do they avoid overheating?
Researchers studying bumble bees thought they dissipate the extra heat from their large, un-insulated thorax & abdomen that presumably radiates heat very effectively.
In effect, the bumble bee has an endothermic thorax and an ectothermic abdomen which acts as a heat dissipater.
However, transfer of heat between thorax and abdomen doesn't happen in flying honeybees.
So how do honeybees keep cool while flying?
In stationary animals, thermoregulation happens changing the amount of metaboling heat (like when shivering)
That mechanism, scientists thought, is not unavailable to flying animals.
In flights massive amount of energy is needed.
The so far idea was that the metabolic costs of flight are determined by animal’s weight, wing area, flight speed, etc.
How could a flying animal vary metabolism for thermoregulation WHILE flying?
The Observation
An experiment comparing flight metabolic
rates of African and European honeybees fount that:
Relatively small increases in air temperature were correlated with substantial decreases in flight metabolic rate and wingbeat frequency.
That suggests that honeybees may be able to vary their
metabolic rate changing flight muscle performance. And that's their way of thermoregulation.
metabolic rate changing flight muscle performance. And that's their way of thermoregulation.
However, the observed correlation may have other explanations.
Perhaps bees that fly in the afternoon, when it is warm, are simply a different age or genetic makeup than bees that fly in cooler weather.
We need a manipulative experiment to rigorously test the hypothesis.
The ExperimentDr. Harrison and his team randomly exposed honeybees to different air temperatures between 20 to 40 oC.
They measured 1. thorax and abdominal temperature, 2. metabolic rate, and 3. wingbeat frequency.
Body temperatures were taken with a tiny, fastresponding microprobe.
Metabolic rates were measured by flowing air through the bee flight chamber at a known rate, and measuring the release of carbon dioxide by the bee.
Wingbeat frequency was measured using a microphone,
tape recorder, and sound-editing software.
tape recorder, and sound-editing software.
The Results
Thorax temperatures varied much less than air temperature.
Clearly, theses honeybees did not thermoregulate like bumblebees.
Can flying honeybees vary metabolic heat production
with air temperature?
with air temperature?
Flight metabolic rates decreased 40 to 50% in bees flying in 40 C air compared to 20 C air (graph).
Honeybees maintain warm, constant thorax temperatures by producing lots of metabolic heat at cool air temperatures, and much less metabolic heat when flying in warm air.
How can honeybees vary metabolic heat production and
still hover?
still hover?
Harrison's team found that the wingbeat frequency of the hovering honeybees fell by 16% as air
temperature increased.
temperature increased.
That suggests that honeybees may vary flight muscle power to vary heat production. Something comparable shivering in mammals.
Bees in colder air use more metabolic fuel and produce more heat because the flight muscles work harder and use more ATP.
We still more experiments to rigorously test this remarkable mechanism.
Wednesday, January 13, 2016
Definitions/Answers to the sample exam
Multiple Choice:
1. Instruction decoder: Decodes an opcode (or, translates instruction to
Can be implemented in hardware or micro-software
2. Cache memory: Much faster than RAM, very close to the CPU, sRAM technology (uses flip-flops).
Cache works like a buffer that stores data to go to RAM and data coming from RAM
3. Interleaving: A trick that enables CPU to store and read information RAM's memory banks
Sender sends 0111, the parity bit is '1' to keep the parity odd.
3. Cache memory will increase the speed of memory. How does it work?
5. Relational databases store their data in different tables. Still they are able to combine the
information from different tables. How does it work? Explain using an example.
So at any moment, if we have the table TEACHES we can access the profile of the Human who teaches some course we want to check asking ‘to whom my foreign key is primary and what does that record give?’.
No matter how many base-2-digits we use, the decimal value 0.1 cannot be represented exactly as a base 2 fraction.
1. Instruction decoder: Decodes an opcode (or, translates instruction to
Can be implemented in hardware or micro-software
2. Cache memory: Much faster than RAM, very close to the CPU, sRAM technology (uses flip-flops).
Cache works like a buffer that stores data to go to RAM and data coming from RAM
3. Interleaving: A trick that enables CPU to store and read information RAM's memory banks
4. Overheating of the tiny, crammed electronic components is the biggest problem when making new chips.
5. An ER diagram:
- Does NOT describe how a program works
- Does NOT contain info about the records of the database
- Is used be both the database designer and the customer
6. SQL syntax:
WHEN category = 'goat' OR category = 'tennis'
The rest two are wrong
7. A primary key
- Can be composed by more than one fields (composite primary)
- Can NOT have the same value in more than one row
- Is very important in making relations between tables
- Can be defined in different ways (NOT uniquely defined) but once you define it you have to stick with the attribute/attributes that make it.
8. An interrupt is a signal from an I/O device to the CPU asking for attention
- CPU can ignore maskable interrupts
- CPU can NOT ignore NON-maskable interrupts (they have priority over running programs)
9. If many interrupts come to the CPU at the same time
- CPU can not handle them at the same time
- CPU gives grants to accept interrupts
- The highest priority I/O will receive a grant and pass the signal to the next device
- They can not hear from each other and self regulate
10. To send data to I/O devices a request (a system call) is sent to the operating system.
The I/O device needs an address to communicate with the I/O interface. The I/O card handles the data.
11. Low level programming languages:
- Are close to the hardware/circuits/machine language
- Only understand very few nstructions
- Are really hard to write code on
- That's why we use easier high level languages
- High level language is converted to low level
- Different CPUs understand different low-lvl languages
12. The Scheduler: Decides which process will be served when (scheduling) in order to maximize efficiency.
13. The Data Register contains the data to be stored in the computer storage (e.g. RAM), or the data after a fetch from the computer storage.
5. An ER diagram:
- Does NOT describe how a program works
- Does NOT contain info about the records of the database
- Is used be both the database designer and the customer
6. SQL syntax:
WHEN category = 'goat' OR category = 'tennis'
The rest two are wrong
7. A primary key
- Can be composed by more than one fields (composite primary)
- Can NOT have the same value in more than one row
- Is very important in making relations between tables
- Can be defined in different ways (NOT uniquely defined) but once you define it you have to stick with the attribute/attributes that make it.
8. An interrupt is a signal from an I/O device to the CPU asking for attention
- CPU can ignore maskable interrupts
- CPU can NOT ignore NON-maskable interrupts (they have priority over running programs)
9. If many interrupts come to the CPU at the same time
- CPU can not handle them at the same time
- CPU gives grants to accept interrupts
- The highest priority I/O will receive a grant and pass the signal to the next device
- They can not hear from each other and self regulate
10. To send data to I/O devices a request (a system call) is sent to the operating system.
The I/O device needs an address to communicate with the I/O interface. The I/O card handles the data.
11. Low level programming languages:
- Are close to the hardware/circuits/machine language
- Only understand very few nstructions
- Are really hard to write code on
- That's why we use easier high level languages
- High level language is converted to low level
- Different CPUs understand different low-lvl languages
12. The Scheduler: Decides which process will be served when (scheduling) in order to maximize efficiency.
13. The Data Register contains the data to be stored in the computer storage (e.g. RAM), or the data after a fetch from the computer storage.
- It does not contain any specific instructions it's just a 'bucket' that stores data temporarily.14. Hints for algebra with different numeric systems:
- Octal positive integers need 3 bits per digit.
- Hexadecimal positive integers need 4 bits per digit.
- Binary positive integers need one bit per digit.
- We multiply bits/digit with nr. of digits, e.g (2AD6 needs 4bits*4bits/digit = 16 bits to be stored)
- If we don't have enough bits to store a number we have overflow.
15. Virtual memory is memory from the Hard Disk Drive that plays the role of RAM when the computer needs more main memory. We can decide how much virtual memory we want to have available. It is slower than RAM.
16. Databases store their data outside the programs, so programs and data become independent of each other. Nuff said.
17. Direct memory access (DMA) is a feature that allows some hardware (I/O) to access main system memory (RAM) independently of the CPU.
The CPU first starts the transfer, then it does other work while the transfer is in progress, and finally receives an interrupt from the DMA controller when the operation is done. It's useful when the CPU cannot keep up with the rate of data transfer, or when the CPU needs to perform useful work while waiting for a slow I/O data transfer.
18. CPU needs address to communicate with memory and I/O devices.
19. CUSTOMER ( ID, Name, MailAddress, TelNr)
PROBLEM (ID, date, description, cameraSerialNr, CameraStatus, customerID)
CAMERA (cameraSerialNr, brand, imageSensor, pixels, ISOSensitivity)
SELECT name, cameraSerialNr
FROM CUSTOMER INNER JOIN PROBLEM
ON CUSTOMER.ID = problem.customerid
WHERE camerastatus <> 'old'
- Octal positive integers need 3 bits per digit.
- Hexadecimal positive integers need 4 bits per digit.
- Binary positive integers need one bit per digit.
- We multiply bits/digit with nr. of digits, e.g (2AD6 needs 4bits*4bits/digit = 16 bits to be stored)
- If we don't have enough bits to store a number we have overflow.
15. Virtual memory is memory from the Hard Disk Drive that plays the role of RAM when the computer needs more main memory. We can decide how much virtual memory we want to have available. It is slower than RAM.
16. Databases store their data outside the programs, so programs and data become independent of each other. Nuff said.
17. Direct memory access (DMA) is a feature that allows some hardware (I/O) to access main system memory (RAM) independently of the CPU.
The CPU first starts the transfer, then it does other work while the transfer is in progress, and finally receives an interrupt from the DMA controller when the operation is done. It's useful when the CPU cannot keep up with the rate of data transfer, or when the CPU needs to perform useful work while waiting for a slow I/O data transfer.
18. CPU needs address to communicate with memory and I/O devices.
19. CUSTOMER ( ID, Name, MailAddress, TelNr)
PROBLEM (ID, date, description, cameraSerialNr, CameraStatus, customerID)
CAMERA (cameraSerialNr, brand, imageSensor, pixels, ISOSensitivity)
SELECT name, cameraSerialNr
FROM CUSTOMER INNER JOIN PROBLEM
ON CUSTOMER.ID = problem.customerid
WHERE camerastatus <> 'old'
The fucker tried to join on different fields which ain't make no join at all, duh!
< > means not equal to
20. The fetch and execute cycle reads and writes data from/to the memory.
________________________
Questions:
1. When writing and reading data (to or from memory or external devices) we would like to know if these operations were carried out without errors. Explain what principle can be used to develop error detection and error correction. Illustrate this with an example.
20. The fetch and execute cycle reads and writes data from/to the memory.
________________________
Questions:
1. When writing and reading data (to or from memory or external devices) we would like to know if these operations were carried out without errors. Explain what principle can be used to develop error detection and error correction. Illustrate this with an example.
There are many ways to implement error detection and correction. The core idea of some is using parity bits.
Using one parity bit for error detection goes as following:
Each packet of bits of specific length has one bit that ensures that the total number of '1' bits are odd.
So, if the data-bits of '1' are odd the parity bit is '0' and if the 'data' 1-bits are even the parity bit is '1' to make everything even.
The reader expects always odd number of ones per packet so if he sees even number he knows there has been an error.
That is called odd parity. Even parity works exactly the same way only now the parity bit ensures the number of ones are even.
We can have more than one parity bits per packet and more sophisticated techniques like Hamming code to not only get better detection but even correct the errors.
In modern communication it may be enough to just detect the errors and when found request a re-send because errors aren't that frequent.
Here's a simple example of a 4-bit packet with odd parity. The last bit is the parity bit.
Sender sends 0111, the parity bit is '1' to keep the parity odd.
Receiver receives 0011 (somehow the 2nd bit became '0'). Since odd parity is agreed, the receiver knows that something went wrong as there is even number of 1-bits (2), so he can request re-send of the packet
2. Many webpages refer to UTF-8 in the first lines. This is a Unicode encoding scheme using variable length encoding . What is this? Explain using an example.
To encode all the different characters from different languages we need lots of bits. But, using many -say, 64- bits for each character is a huge waste of memory if we don't use more than the most common ones.
UTF-8 allows us to use as many 8-bits (bytes) for each character as needed.
For example, English letters will use only one byte each but emojis that are in recent huge collections of symbols may use 4 or even 5 bytes each.
In order for the computer to know where to stop reading a character there are some bits in the beginning that denote how many of the following bytes will be used for that character.
For example, 01XXXXXX.... is 1 byte/char
110XXXXX 10XXXXXX is 2 bytes/char
1110XXXX 10XXXXXX 10XXXXXX is 3 bytes/char
etc
3. Cache memory will increase the speed of memory. How does it work?
Cache is a sort of buffer memory that helps the CPU access information much faster than in RAM. Cache writes and reads from RAM. Cache ideally contains data that the CPU uses frequently so it doesn't have to reach all the way to RAM.
Cache is organized in levels of proximity L1 (closest) L2, L3 etc, the closer to the CPU the chip is the faster it is.
L1 communicates with L2 which communicates with L3 which can communicate to RAM if there's no other level.
Cache, is much faster than main memory (RAM).
It's built with a much faster technology (Static RAM as opposed to DRAM of main memory). It's also much closer to the CPU (inside the CPU chip).
Cache is also way more expensive than main memory.
Cache is also way more expensive than main memory.
4. When you switch off a computer, all the content of the memory is lost. How is it possible to startup the computer again, since there is no program available in memory anymore?
Well, thankfully the computer contains non volatile memory called ROM (Read Only Memory).
ROM is already written when we get the computer and contains the BIOS (basic input/output system) and generally everything needed to startup the computer, have access to the keyboard and screen and start loading the operating systems.
ROM can not be erased/rewritten by the computer.
Sometimes the non volatile information stored in ROM is called the firmware of the computer (or some device that may use such memory)
5. Relational databases store their data in different tables. Still they are able to combine the
information from different tables. How does it work? Explain using an example.
Each of the tables of a relational database must have a field or a unique combination of fields defined as 'primary key'. That will uniquely define each of the other attribute values of a record.
In order for a table to relate with another, one or more attributes will be defined with the same name as the primary key of a different table, and will be taking values that exist in the records of that primary key. Those attributes are called foreign keys.
So, we can uniquely identify fields of a different table if in our table there is a foreign key of the one we want to relate with.
Example of two tables:
PERSON
Human_ID Primary key
|
1
|
2
|
3
|
Name
|
Patrick
|
Bob
|
Squid
|
Phone_Number
|
67985433
|
4853948
|
3873049
|
TEACHES
Course_ID Primary key
|
Computerologly
|
Databaseball
|
Goats
|
Difficulty
|
Toughie
|
It’s_ok
|
gweeeeh!
|
Human_ID Foreign Key
|
1
|
1
|
1
|
In this case the primary key Human_ID of PERSON is a foreign key in TEACHES.
So at any moment, if we have the table TEACHES we can access the profile of the Human who teaches some course we want to check asking ‘to whom my foreign key is primary and what does that record give?’.
6. Rounding errors can be a problem when entering decimal data in a computer. Why?
Explain if this is always a problem. Use an example!
Floating-point numbers are represented in computer hardware as base 2 (binary) fractions.
Explain if this is always a problem. Use an example!
Floating-point numbers are represented in computer hardware as base 2 (binary) fractions.
For example, the decimal fraction 0.125 has value 1/10 + 2/100 + 5/1000, and similarly the binary fraction
0.001 has value 0/2 + 0/4 + 1/8.
0.001 has value 0/2 + 0/4 + 1/8.
(0.125)10 = (0.001)2
These these are two identical decimal numbers, just the first is written in base 10 fractional notation, and the second in base 2.
Unfortunately, most decimal fractions cannot be represented exactly as binary fractions.
Unfortunately, most decimal fractions cannot be represented exactly as binary fractions.
So, the decimal floating-point numbers you enter are usually only approximated by the binary floating-point numbers that are actually stored in the machine.
No matter how many base-2-digits we use, the decimal value 0.1 cannot be represented exactly as a base 2 fraction.
In base 2, 1/10 is the infinitely repeating fraction
0.000110011001100110011...
So we stop at any finite number of bits, and you get an approximation.
There rounding errors can be ok in addition and subtraction but in multiplication (and divisions) they often greatly escalate and give results with big errors/ many unreliable digits.
0.000110011001100110011...
So we stop at any finite number of bits, and you get an approximation.
There rounding errors can be ok in addition and subtraction but in multiplication (and divisions) they often greatly escalate and give results with big errors/ many unreliable digits.
Friday, January 8, 2016
How your computer works
In Von Neumann architecture we have:
#1. CPU (central processing units): Makes calculations, processing, control
The CPU contains:
The Data Path/Unit that and Control Path/Unit
which, more analytical contain:
Instruction register: Contains instructions
Instruction decoder: Signals to execute instructions
ALU: does the calculations/operations
Accumulator: Part of register that stores operands and results
Program counter: address of next instruction
Address register: address to be sent to memory
The instructions are executed sequentially in 2 phases.
The Fetch cycle: Fetch the next instruction from the Program Counter and store in the Instruction Register
The Execute Cycle: Read values from Registers, pass to ALU, write the result to the Register, store result in memory or send to Output device (I/O).
Machine language: Very basic instructions, fest execution, low level.
- Contains Operation Codes (opcodes)
Simpler definition from slides:
How does the CPU execute instructions ?
Fetch cycle: Instructions are stored in memory: must be fetched and
decoded
Execute cycle:
Decoded instruction must be executed.
Possibly operands must be fetched
Possibly operands must be written back
Example
To be executed: C=A+B
Step 1: store operands A and B in memory (2
addresses)
A: stored in memory cell 1000
B: stored in memory cell 1004
Step 2: find a memory space to store C
C: will be stored in memory cell 1008
Step 3: Translate the instruction in simple machine
instructions
LOAD 1000
ADD 1004
STORE 1008
Step 4: Load the program into memory
Program:
#1. CPU (central processing units): Makes calculations, processing, control
The CPU contains:
The Data Path/Unit that and Control Path/Unit
which, more analytical contain:
Instruction register: Contains instructions
Instruction decoder: Signals to execute instructions
ALU: does the calculations/operations
Accumulator: Part of register that stores operands and results
Program counter: address of next instruction
Address register: address to be sent to memory
Data register: data exchange with memory
Internal registers: temporary storageThe instructions are executed sequentially in 2 phases.
The Fetch cycle: Fetch the next instruction from the Program Counter and store in the Instruction Register
The Execute Cycle: Read values from Registers, pass to ALU, write the result to the Register, store result in memory or send to Output device (I/O).
Machine language: Very basic instructions, fest execution, low level.
- Contains Operation Codes (opcodes)
Simpler definition from slides:
How does the CPU execute instructions ?
Fetch cycle: Instructions are stored in memory: must be fetched and
decoded
Execute cycle:
Decoded instruction must be executed.
Possibly operands must be fetched
Possibly operands must be written back
Example
To be executed: C=A+B
Step 1: store operands A and B in memory (2
addresses)
A: stored in memory cell 1000
B: stored in memory cell 1004
Step 2: find a memory space to store C
C: will be stored in memory cell 1008
Step 3: Translate the instruction in simple machine
instructions
LOAD 1000
ADD 1004
STORE 1008
Step 4: Load the program into memory
Program:
Memory address: Command:
0000 LOAD 1000
0001 ADD 1004
0002 STORE 1008
0003 HALT
Memory:
1000 234
1004 980
1008 1214
The computer starts with the first instruction:
memory address 0000
memory address 0000
This is done by loading the program counter with 0000
________________________
Different CPUs have different instruction sets
Programs will not run on another CPU without conversion
We try really hard to speed up CPUs
=> Increasing Clock frequency (e.g 2.4 GHz)
Speed doesn't depend only on clock frequency
Other ways to increase speed:
Make broader data paths
Making faster decoders in hardware
Using parallelism (inside and outside CPU)
_____
Software development and stuff
Layers of organization/ languages
We write code in high level programming languages
the assembler converts it to (-> ASSEMBLY language)
operating system
machine language
that manipulates the hardware
Programming languages:
are instructions based on some vocabulary that the computer understands -through other software, see below-
Low level languages are close to the hardware, execute almost directly
High level languages are closer to human understanding
The Interpreter reads high level language,
produces instructions on a lower level and runs them
Fast writing, Slow execution
application: prototyping, short programs
The compiler translates high level language
to another program comprising only machine instructions
Slower development, debugging, linking required but fast execution
application: large, reliable programs, final program/app
How a program works:
Source code -> compiler -> object code -> linker (+Object library) -> load module -> loader (+DLL) -> executable
Software development process
definition ->
specifications ->
functional analysis ->
technical design ->
implementation ->
testing ->
support
(don't learn by heart)
Good software development methods:
- Structured programming
- Object oriented programming: We create 'objects' of data, algorithms and even programs, we link and use the objects to build the final product.
That way we can write complex software in a reliable way.
Human mind can't handle as much complexity as some programs require.
____
Coding practices:
Compact code is harder to read & edit but often more efficient.
Software design can be optimized for performance (speed/memory) or maintainability
The Operating system:
Manages the CPU
Manages the memory
Manages the I/O devices
Manages data
Manages your mother
Is kinda like the god
The ancestor of the operating system in those room size computers is called 'monitor program'.
Monitor program was instructing simple processes that we given by people before.
And here we are now with 4K touchscreen miracles frying your balls.
Definition: Operation system is a set of programs designed to manage the computer esteem and interact with the user.
The OS controls the hardware and gives system calls. Users and applications use those system calls to interact with the hardware (screen, keyboard, speakers etc).
Part os the Operating System:
- Kernel
- Device drivers
- Graphical User Interface (GUI)
Structure: layered approach

Firmware is software 'hidden' inside a device (printers, graphic cards, webcams etc)
When 1 CPU has to manage many programs at the same time (which is always) the processes have to share CPU time.
The operating system decides that time allocation.
Processes switch all the time between CPU-use and I/O-use.
When a process uses an I/O device the CPU is free to run another process.
But processes need more time from the CPU than from the I/O so scheduling is important.
Scheduling:
When the OS changes processes that's called context switch. All processes that are ready to run have to wait for the CPU according to the schedule.
Algorithms to select a process:
- First Come First Served (FCFS)
- Shortest Job First (SJF)
- Time Sharing: Each process gets a fixed time period
- Combination/ priorities
When we have many cores (that's many CPUs) the OS decides which process to run on which CPU.
That's called load balancing.
In symmetric multiprocessors all CPUs are treated the same way.
In asymmetric multiprocessors CPUs have different jobs (like controlling, distributing, operations etc)
All this smart systematization requires itself work from the CPU and memory, duh.
But that's how we roll in CS, so suck it up
- - short break - -
Memory Management:
When CPU runs several processes they all need a part of the memory.
Memory management:
- Allocates memory to processes
- Maps the addresses
- Ensures security: A process restricts its operations within its own memory
Principles:
- Memory partitions (segmentation)
- Paging (storing data in a secondary storage like HDD)
- Virtual memory (treating part of the HDD as RAM when RAM is not enough)
Memory partitions involve somethings called 'fence register' and 'relocation register', don't ask details.
I/O (Input/Output) management:
The OS doesn't have direct access to I/O devices but uses system calls.
Devices need drivers, which are software to get them communicate with the OS.
Each device needs its own driver.
Synchronization
Deadlock: Two or more competing actions wait for each other to finish, and thus neither ever does. (Like the awkward sidewalk don't-bump-on-the-stranger dance)
Managing the data:
We use a filesystem:
Stores all the data from files
retrieves files
Structures data in directories
Users and OS use the directory structure.
________________________
Different CPUs have different instruction sets
Programs will not run on another CPU without conversion
We try really hard to speed up CPUs
=> Increasing Clock frequency (e.g 2.4 GHz)
Speed doesn't depend only on clock frequency
Other ways to increase speed:
Make broader data paths
Making faster decoders in hardware
Using parallelism (inside and outside CPU)
_____
Software development and stuff
Layers of organization/ languages
We write code in high level programming languages
the assembler converts it to (-> ASSEMBLY language)
operating system
machine language
that manipulates the hardware
Programming languages:
are instructions based on some vocabulary that the computer understands -through other software, see below-
Low level languages are close to the hardware, execute almost directly
High level languages are closer to human understanding
The Interpreter reads high level language,
produces instructions on a lower level and runs them
Fast writing, Slow execution
application: prototyping, short programs
The compiler translates high level language
to another program comprising only machine instructions
Slower development, debugging, linking required but fast execution
application: large, reliable programs, final program/app
How a program works:
Source code -> compiler -> object code -> linker (+Object library) -> load module -> loader (+DLL) -> executable
Software development process
definition ->
specifications ->
functional analysis ->
technical design ->
implementation ->
testing ->
support
(don't learn by heart)
Good software development methods:
- Structured programming
- Object oriented programming: We create 'objects' of data, algorithms and even programs, we link and use the objects to build the final product.
That way we can write complex software in a reliable way.
Human mind can't handle as much complexity as some programs require.
____
Coding practices:
Compact code is harder to read & edit but often more efficient.
Software design can be optimized for performance (speed/memory) or maintainability
The Operating system:
Manages the CPU
Manages the memory
Manages the I/O devices
Manages data
Manages your mother
Is kinda like the god
The ancestor of the operating system in those room size computers is called 'monitor program'.
Monitor program was instructing simple processes that we given by people before.
And here we are now with 4K touchscreen miracles frying your balls.
Definition: Operation system is a set of programs designed to manage the computer esteem and interact with the user.
The OS controls the hardware and gives system calls. Users and applications use those system calls to interact with the hardware (screen, keyboard, speakers etc).
Part os the Operating System:
- Kernel
- Device drivers
- Graphical User Interface (GUI)
Structure: layered approach

Firmware is software 'hidden' inside a device (printers, graphic cards, webcams etc)
When 1 CPU has to manage many programs at the same time (which is always) the processes have to share CPU time.
The operating system decides that time allocation.
Processes switch all the time between CPU-use and I/O-use.
When a process uses an I/O device the CPU is free to run another process.
But processes need more time from the CPU than from the I/O so scheduling is important.
Scheduling:
When the OS changes processes that's called context switch. All processes that are ready to run have to wait for the CPU according to the schedule.
Algorithms to select a process:
- First Come First Served (FCFS)
- Shortest Job First (SJF)
- Time Sharing: Each process gets a fixed time period
- Combination/ priorities
When we have many cores (that's many CPUs) the OS decides which process to run on which CPU.
That's called load balancing.
In symmetric multiprocessors all CPUs are treated the same way.
In asymmetric multiprocessors CPUs have different jobs (like controlling, distributing, operations etc)
All this smart systematization requires itself work from the CPU and memory, duh.
But that's how we roll in CS, so suck it up
- - short break - -
Memory Management:
When CPU runs several processes they all need a part of the memory.
Memory management:
- Allocates memory to processes
- Maps the addresses
- Ensures security: A process restricts its operations within its own memory
Principles:
- Memory partitions (segmentation)
- Paging (storing data in a secondary storage like HDD)
- Virtual memory (treating part of the HDD as RAM when RAM is not enough)
Memory partitions involve somethings called 'fence register' and 'relocation register', don't ask details.
I/O (Input/Output) management:
The OS doesn't have direct access to I/O devices but uses system calls.
Devices need drivers, which are software to get them communicate with the OS.
Each device needs its own driver.
Synchronization
Deadlock: Two or more competing actions wait for each other to finish, and thus neither ever does. (Like the awkward sidewalk don't-bump-on-the-stranger dance)
Managing the data:
We use a filesystem:
Stores all the data from files
retrieves files
Structures data in directories
Users and OS use the directory structure.
Subscribe to:
Posts (Atom)
