OpenLLM-France/wikimedia huggingface dataset:
# A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Programming/Modulo arithmetic

Modular arithmetic is all about finding the remainder from long division (MOD), and the total number of times that a number goes into a division (DIV). Let's take a look at a quick example of 10 divided by 7 (you might want to remind yourself about long division):
Hopefully that wasn't too hard. We now need to introduce some terminology, MOD and DIV:
* MOD = finds the remainder from long division i.e. 10 MOD 7 = 3
* DIV = finds the number of divides in long division i.e. 10 DIV 7 = 1
* Exercise: MOD and DIV
* Try these examples, working out the MOD and DIV of each:
* 7 / 2
* Answer:
* MOD = 1
* DIV = 3
* 17 / 5
* Answer:
* MOD = 2
* DIV = 3
* 8 / 2
* Answer:
* MOD = 0
* DIV = 4
* 6 / 9
* Answer:
* MOD = 6
* DIV = 0 (9 does not divide into 6 at all!)
* Now try these explicit calculations:
* 11 MOD 8
* Answer:
* = 3
* 8 MOD 4
* Answer:
* = 0
* 6 DIV 5
* Answer:
* = 1
* 600 DIV 20
* Answer:
* = 30
Hopefully you are now pretty good with MOD and DIV, but what exactly is the point of all this? A very common example in past exam paper has been using the MOD and DIV to work out a binary equivalent of a denary number.
Example: Converting Denary to Binary using DIV
sub convertDtoB(byVal base10 as integer)
dim base2(7) as integer 'create an array to store the binary
dim temp as integer = base10
for i = 7 to 0 step -1 'loop through each binary bit starting from the biggest value
base2(i) = temp \ (2^i) 'temp DIV 2^i
temp = temp MOD 2^i
next
console.write(base10 & " in binary = ")
for i = 7 to 0 step -1 'loop through each binary bit starting from the biggest value
console.write(base2(i))
next
end sub
Try the code out and see if it works. Try to write a trace table and see how it works for the number 67 (again another popular question in exams):
Answer:
base10
temp
2^i
i
base2
01234567
6767
12870
36461
3250
1640
830
420
1211
0101
Output:
67 in binary = 01000011 :
Another common use is in finding out whether a number is odd or even using the MOD function. We know that MOD returns the remainder from a division sum. So for example 4 MOD 2 = 0, 5 MOD 2 = 1, 6 MOD 2 = 0 and so on. By modding something with 2 we can work out whether it is odd or not due to the return value.
* Example: Finding out if a number is Odd using MOD
* Dim testNum as Integer
* Dim temp as Integer
* console.writeline("please insert a number to test:")
* testNum = console.readline
* If testNum MOD 2 = 0 Then
* Console.Writeline("The number is even")
* Else
* Console.Writeline("The number is odd")
* End If
# Advanced Structural Analysis/Part I - Theory/Typical Engineering Materials

* Metals
* Non-metals
# Part I - Theory
## Introduction
## Failure Modes
### Introduction
### Fatigue

* J. Schijve; Fatigue of Structures and Materials; Springer
* S. Suresh; Fatigue of Materials; Cambridge
etc.
# Content

See Layout.

# Unit System

Physical units should be in the metric system when possible. Contributions that are not in line with this recommendation should be converted into the metric system.

# Images

Images can be found at Wikimedia Commons.
Instructions on how to include images from Wikimedia Commons are found here.
If you wish to produce your own illustrations but do not have a professional tool to work with, I suggest you try out Inkscape. The program is excellent and free.

# Automatic Indexing

Don't forget to add the tag {{BookCat}} at the bottom of each page. This will include the page in wikibook.org's indexing system.
# Advanced Structural Analysis/Part I - Theory/Residual Stress

* Introduction
* Causes
* Effects

# Introduction

Residual stresses are stress fields that prevail in non-loaded structures. For instance, a normal bolt resting in the palm of your hand may experience large measures of stress. This is not because of your demeanor or the way you are holding it, instead it is due to the way the bolt has been manufactured. A quality thread is rolled rather than cut. Thus the material has been subjected to significant plastic deformation, which creates compressive stresses in the creases of the thread. The treatment also generates tensile stresses, as required by the law of force equilibrium.
Compressive residual stresses in the thread are favorable to the fatigue life of the bolt, and are thus desirable. The corresponding tensile stress's, on the other hand, may have a negative impact on the maximum load carrying capacity. However, this weakening effect is small thanks to the material's ability to yield and redistribute the stress fields in the event of an extreme load.
Residual stresses may have positive, negative or no practical effects on a structure's mechanical integrity. Whatever the case may be, knowing about them is important. This chapter explains common causes and possible effects of residual stresses, and thoroughly prepares the reader for related topics in subsequent chapters.
# Advanced Structural Analysis/Participate

Feel free to participate and accelerate the development of this wikibook! Check out Discussion for some quick start tips and more.
Also, if you feel so inclined, please notify universities and other potential participants about this project.

## Chapters

* Quick Start
# Advanced Structural Analysis/The Contributors
## Peter Norlindh (hpon)

MSc in Mechanical Engineering. Initiator of this wikibook.
# Advanced phone customization/Before we start

You would have reached this place likely because
* Your phone is slow and you're looking for ways to speed it up
* You're low on space
* You hate the skin or apps provided by the device manufacturer which you cannot remove directly
* Anything else
An important term which we'll be using throughout this book is stock. It refers to the OS (with its skins, programs and all) which was shipped with your device manufacturer.

## Some common myths

* It's god: It's not. It can indeed do wonder to your phone if done properly. But neither a root nor installing a custom OS can defeat the phone's hardware: if it is underpowered, then it most likely is. You cannot buy a Nokia 1 and expect to perform it to the level of a Galaxy Note 20.
* It can fix my camera/speaker/xyz: Rooting is software. It has nothing to do with your hardware. If your camera stopped working, then most likely it has failed and you should take it to a repair shop.
* Everything'll work: Not necessarily. The quality of the ROM you get is dependent on many factors. Often there are some phone features which are too complex to include in a ROM and may not be included or have issues. A common example is Dual-Sim support; many ROMs have issues or work only with one sim.

## The warnings

* While the risk to your phone is minimal if done properly, as with anything else of this nature, there is a small risk of your phone getting bricked to a state where it's permanently broken. You're doing this purely on your own risk.
* Your warranty on your phone could be voided, depending on the manufacturer (see special note on Samsung phones below).
* You'll lose your apps and data during this process; make a backup of them.

## For Samsung phones

Most new Samsung phones (from the Galaxy S5-S6 series onwards) use a QFuse which is a hardware feature tied to Samsung's Knox security system. If an attempt to install a custom ROM is detected, it will succeed, but the QFuse (often referred to as the Knox switch) will trip. The below screenshot shows a Note 3 with the Knox switched tripped (notice that that Warranty Void hexadecimal is 0x1 and not 0x0).
This has warranty and service implications for you as it means that you will be unable to obtain in-service warranty as they will notice that you have tampered with the phone. As it is a hardware switch, it cannot be reversed once tripped, even if you later reinstall the stock OS. You may also be unable to access Knox features or use Samsung Pay.
Hence, it is advised that you root/install the custom OS on your Samsung phone after the warranty expires (which is usually for one or two years).
# Applied Science AQA/Template
## Topic Title
### Setting Applied context

A brief paragraph about where this science is used
| Syllabus Content | What you need to do |

### Exploration of key ideas (must be original text, not C&P) – level checked by AQA

In general, point students towards the approach to take, as opposed to just giving them information.

#### Concept 1

explanation 1

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Study Task

Work to do to understand this topic e.g. research, analysis

### Careers and Organisations

Carry out some research into these jobs in this area. (Feel free to add other jobs you find.)
| Research these roles: | What are the benefits of this role to society? | What organisations would employ someone in this role?  (Where would they work?) | What would someone in this role have to do within the organisation? | What scientifically-related skills do they need to have?  What techniques do they need to have mastered? | What experience is needed to undertake this role and its responsibilities within an organisation? | What other science personnel will they work with in their organisation. |
| Job 1 | | | | | | |
| Job 2 | | | | | | |

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
click to reveal answer

### Exam-style questions

– can we use old AQA qs... e.g. from more than 5 years ago? With Examiner comments
click to reveal answer

### Links

to other sections within this book
to good external websites (including AQA website, Wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Kinematics
## Kinematics
### Setting Applied context

A brief paragraph about where this science is used
| Syllabus Content | What you need to do |
| • the motion of objects | Describe motion in terms of displacement, speed, velocity and acceleration. Know the difference between: - distance and displacement - speed and velocity |
| • the formulas : (average) v = s/t v = u + at v$^2$ = u$^2$ + 2as s = ut + ½ at$^2$ | Use these suvat equations to calculate any of the five quantities. Recognise 'hidden' information, such as a=9.81 ms$^{−2}$ when falling, or that accelerating from rest gives u = 0 ms$^{−1}$. |
| • representing motion through the use of graphs of displacement against time and velocity against time | Use these graphs to describe motion. Calculate the gradient of a displacement-time graph as speed. Calculate the gradient of a velocity-time graph as acceleration. Calculate the area under a velocity-time graph as distance traveled. (Gradients may require the calculation of the tangent to a curve at a point.) |

### Explanation of key ideas (must be original text, not C&P) – level checked by AQA
#### Concept 1

explanation 1

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Careers and Organisations

Typical jobs / companies worth looking into

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
to exemplify level required – level checked by AQA

### Exam-style questions

– can we use old AQA qs… e.g. from more than 5 years ago? With Examiner comments

### Links

to other sections within this book
to good external websites (including AQA website, Wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Radiotherapy and Radioactive Tracers
## P02 Radiotherapy and Radioactive Tracers
### Context

... to be familiar with....
| Performance outcomes | Pass | Merit | Distinction |
| | To achieve a pass the learner must evidence that they can: | In addition to the pass criteria, to achieve a merit the learner must evidence that they can: | In addition to fulfilling the pass and merit criteria, to achieve a distinction the learner must evidence that they can: |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | P3 | M3 | D2 |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | Make sure your two techniques are for therapy (treatment - NOT DIAGNOSIS.) Link each technique clearly to an example of what it can be used to treat. Use diagrams to support your explanations. | Explain why each type of therapy is administered as it is. Describe and explain the effects that each method has on the condition being treated. | It can be useful to make a comparison here: - how invasive is each technique? - what side effects can be caused and so consider the experience of a patient undergoing each treatment. |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | P4 | M4 | D3 |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | Name and give the key quantities associated with the isotope. Include the type of radiation emitted and the isotope's half-life. Then link these properties to how the isotope is used. | | |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | P5 | M5 | D4 |
| PO2 Understand radiotherapy techniques and the use of radioactive tracers | P6 | M6 | |

### Brief

In general, point students towards the approach to take, as opposed to just giving them information.

### Advice

Be very careful to consider whether a criterion asks you to write about therapy or diagnosis (e.g. tracers).

### Checklist

– relating to criteria skills

### Links

to other sections within this book
to good external websites (including AQA website, wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Resistivity Portfolio
## Syllabus Content

Materials scientists need to be able to recommend appropriate materials for electrical components in a huge range of products.
In completing investigations, learners will develop their knowledge and understanding of the following concepts:
* the meaning of resistivity
* how the resistance of an electrical component relates to the resistivity of the material it is made from
* importance of knowing the resistivity of a material
* uses of materials with both high and low values of resistivity, including, for example, new semiconductors used in electronic circuits
* use of standard procedure to measure the resistivity of a piece of wire
* accuracy and reliability of data, recorded with appropriate precision
* methods used in industry
* recording appropriate measurements:
* calculate a value for the wire’s resistivity
* calculate the theoretical percentage error
* calculated value compared with researched value for resistivity of the wire’s material
* reasons for differences between theoretical and calculated values
* evaluation of methodology.

## Advice

DON'T just copy and paste anything! You can't get any marks for something someone else wrote.
Use the official glossary to clarify the meanings of the words accurate and precise.

## Checklist - before you hand in:

Have you:

### Pass

* Given a definition of resistivity
* Explained the differences in behaviour between materials with a high and a low resistivity, using examples
* Carried out the experiment and found a value for resistivity - with units (probably from a graph gradient)
* Written a full risk assessment

#### Merit

* Chosen examples of materials with high and low resistivities and explained why these materials are used for particular purposes in industry
* Compared the value from your resistivity experiment with an official value - evaluated and explained why yours is different.

#### Distinction

* Written about industrial methods for finding resistivity- and explained how they are both more accurate and more precise than your classroom method - e.g. the conditions in which they are carried out
# Applied Science AQA/Transport Mechanisms
## Topic Title
### Setting Applied context

Those working in the pharmaceutical industry need to understand how substances are absorbed and transported in cells. Knowledge of these mechanisms has applications in the development of drug therapies to treat cancer, dementia, diabetes and HIV, and in the production of amino acids for food products.
* Syllabus Content
* •    the structure of cell membranes as a phospholipid bilayer with proteins interspersed
* •    the function of intrinsic proteins, including their role in facilitated diffusion and active transport
* •    the function of extrinsic proteins.

### Exploration of key ideas (must be original text, not C&P) – level checked by AQA

In general, point students towards the approach to take, as opposed to just giving them information.

#### Concept 1

explanation 1

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Study Task

Work to do to understand this topic e.g. research, analysis

### Careers and Organisations

Carry out some research into these jobs in this area. (Feel free to add other jobs you find.)
| Research these roles: | What are the benefits of this role to society? | What organisations would employ someone in this role?  (Where would they work?) | What would someone in this role have to do within the organisation? | What scientifically-related skills do they need to have?  What techniques do they need to have mastered? | What experience is needed to undertake this role and its responsibilities within an organisation? | What other science personnel will they work with in their organisation. |
| Job 1 | | | | | | |
| Job 2 | | | | | | |

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
click to reveal answer

### Exam-style questions

– can we use old AQA qs… e.g. from more than 5 years ago? With Examiner comments
click to reveal answer

### Links

to other sections within this book
to good external websites (including AQA website, wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Resistance and Resistors
## Topic Title
### Setting Applied context

It is useful to have studied this topic before doing the Unit 2 resistivity portfolio.
* Syllabus Content
* •    calculating the total resistance of a circuit which contains resistors in series, resistors in parallel and a combination of both
* •    the formulas:
* R $_{total}$ = R$_1$ + R$_2$ + R$_3$
* 1/R total = 1/R$_1$ + 1/R$_2$ + 1/R$_3$
* •    uses of potential divider circuits
* •    free electrons and the electrical behaviour of conductors and semiconductors
* •    the effect of temperature on the resistance of conductors and semiconductors
* •    the behaviour of thermistors and light-dependent resistors (LDRs)
* •    graphs of V against I to find resistance
* •    graphs of voltage against current for a range of components including standard resistors, thermistors and lamps.

### Exploration of key ideas (must be original text, not C&P) – level checked by AQA

In general, point students towards the approach to take, as opposed to just giving them information.

#### Concept 1

explanation 1

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Study Task

Work to do to understand this topic e.g. research, analysis

### Careers and Organisations

Carry out some research into these jobs in this area. (Feel free to add other jobs you find.)
| Research these roles: | What are the benefits of this role to society? | What organisations would employ someone in this role?  (Where would they work?) | What would someone in this role have to do within the organisation? | What scientifically-related skills do they need to have?  What techniques do they need to have mastered? | What experience is needed to undertake this role and its responsibilities within an organisation? | What other science personnel will they work with in their organisation. |
| Job 1 | | | | | | |
| Job 2 | | | | | | |

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
click to reveal answer

### Exam-style questions

– can we use old AQA qs… e.g. from more than 5 years ago? With Examiner comments
click to reveal answer

### Links

to other sections within this book
to good external websites (including AQA website, wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# A-level Physics (Advancing Physics)/Energy in Simple Harmonic Motion

A mass oscillating on a spring in a gravity-free vacuum has two sorts of energy: kinetic energy and elastic (potential) energy. Kinetic energy is given by:
$E_{k}={\frac {1}{2}}mv^{2}$
Elastic energy, or elastic potential energy, is given by:
$E_{e}={\frac {1}{2}}kx^{2}$
So, the total energy stored by the oscillator is:
$\Sigma E={\frac {1}{2}}(mv^{2}+kx^{2})$
This total energy is constant. However, the proportions of this energy which are kinetic and elastic change over time, since v and x change with time. If we give a spring a displacement, it has no kinetic energy, and a certain amount of elastic energy. If we let it go, that elastic energy is all converted into kinetic energy, and so, when the mass reaches its initial position, it has no elastic energy, and all the elastic energy it did have has been converted into kinetic energy. As the mass continues to travel, it is slowed by the spring, and so the kinetic energy is converted back into elastic energy - the same amount of elastic energy as it started out. The nature of the energy oscillates back and forth, but the total energy is constant.
If the mass is oscillating vertically in a gravitational field, the situation gets more complicated since the spring now has gravitational potential energy, elastic potential energy and kinetic energy. However, it turns out (if you do the maths) that the total energy is still constant, although the equilibrium position will be lower.

## Questions

1. A 10g mass causes a spring to extend 5 cm. How much energy is stored by the spring?
2. A 500g mass on a spring (k=100) is extended by 0.2m, and begins to oscillate in an otherwise empty universe. What is the maximum velocity which it reaches?
3. Another 500g mass on another spring in another otherwise empty universe is extended by 0.5m, and begins to oscillate. If it reaches a maximum velocity of 15ms$^{−1}$, what is the spring constant of the spring?
4. Draw graphs of the kinetic and elastic energies of a mass on a spring (ignoring gravity).
5. Use the trigonometric formulae for x and v to derive an equation for the total energy stored by an oscillating mass on a spring, ignoring gravity and air resistance, which is constant with respect to time.
Worked Solutions