1959 by Voice of America.
This film is really good.
Microbit simulator using some Microsoft framework.
TODO the Python code from there does not seem to run on the microbit via
uflash
, because it is not MicroPython.support.microbit.org/support/solutions/articles/19000111744-makecode-python-and-micropython explains.
forum.makecode.com/t/help-understanding-local-build-options/6130 asks how to compile locally and suggests it is possible. Seems to require Yotta, so presumably compiles?
Presumably this is because Microsoft ported their MakeCode thing to the MicroBit, and the Micro Bit foundation accepted them.
E.g. there toggling a LED:but the code that works locally is a completely differently named API Microsoft going all in on adopt extend extinguish from an early age!
led.toggle(0, 0)
set_pixel
:microbit.display.set_pixel(0, 0, )
Output: another sequence of complex numbers such that:Intuitively, this means that we are braking up the complex signal into sinusoidal frequencies:and is the amplitude of each sine.
- : is kind of magic and ends up being a constant added to the signal because
- : sinusoidal that completes one cycle over the signal. The larger the , the larger the resolution of that sinusoidal. But it completes one cycle regardless.
- : sinusoidal that completes two cycles over the signal
- ...
- : sinusoidal that completes cycles over the signal
We use Zero-based numbering in our definitions because it just makes every formula simpler.
Motivation: similar to the Fourier transform:In particular, the discrete Fourier transform is used in signal processing after a analog-to-digital converter. Digital signal processing historically likely grew more and more over analog processing as digital processors got faster and faster as it gives more flexibility in algorithm design.
- compression: a sine would use N points in the time domain, but in the frequency domain just one, so we can throw the rest away. A sum of two sines, only two. So if your signal has periodicity, in general you can compress it with the transform
- noise removal: many systems add noise only at certain frequencies, which are hopefully different from the main frequencies of the actual signal. By doing the transform, we can remove those frequencies to attain a better signal-to-noise
Sample software implementations:
- numpy.fft, notably see the example: numpy/fft.py
DFT of with 25 points
. This is a simple example of a discrete Fourier transform for a real input signal. It illustrates how the DFT takes N complex numbers as input, and produces N complex numbers as output. It also illustrates how the discrete Fourier transform of a real signal is symmetric around the center point.Notable ones:
See sections: "Example 1 - N even", "Example 2 - N odd" and "Representation in terms of sines and cosines" of www.statlect.com/matrix-algebra/discrete-Fourier-transform-of-a-real-signal
The transform still has complex numbers.
Summary:Therefore, we only need about half of to represent the signal, as the other half can be derived by conjugation.
- is real
"Representation in terms of sines and cosines" from www.statlect.com/matrix-algebra/discrete-Fourier-transform-of-a-real-signal then gives explicit formulas in terms of .
NumPy for example has "Real FFTs" for this: numpy.org/doc/1.24/reference/routines.fft.html#real-ffts
DFT of with 25 points
. Source at: numpy/fft_plot.py. This plot illustrates how the DFT of a real signal is symmetric around the middle point, and so only half of the transform points are needed to reconstruct the original signal. We also see how the phase of the sinusoids determines if their DFT components are real or imaginary.The basic intuition for this is to start from the origin and make small changes to the function based on its known derivative at the origin.
More precisely, we know that for any base b, exponentiation satisfies:And we also know that for in particular that we satisfy the exponential function differential equation and so:One interesting fact is that the only thing we use from the exponential function differential equation is the value around , which is quite little information! This idea is basically what is behind the importance of the ralationship between Lie group-Lie algebra correspondence via the exponential map. In the more general settings of groups and manifolds, restricting ourselves to be near the origin is a huge advantage.
- .
- .
Now suppose that we want to calculate . The idea is to start from and then then to use the first order of the Taylor series to extend the known value of to .
E.g., if we split into 2 parts, we know that:or in three parts:so we can just use arbitrarily many parts that are arbitrarily close to :and more generally for any we have:
Let's see what happens with the Taylor series. We have near in little-o notation:Therefore, for , which is near for any fixed :and therefore:which is basically the formula tha we wanted. We just have to convince ourselves that at , the disappears, i.e.:
The conventional starting point is not at the E. Coli K-12 MG1655 origin of replication.
biocyc.org/ECOLI/NEW-IMAGE?type=EXTRAGENIC-SITE&object=G0-10506 explains:If it is a bit hard to understand what they mean by "origin of transfer" though, as that term is usually associated with the origin of transfer of bacterial conjugation.
This site is the origin of replication of the E. coli chromosome. It contains the binding sites for DnaA, which is critical for initiation of replication. Replication proceeds bidirectionally. For historical reasons, the numbering of E. coli's circular chromosome does not start at the origin of replication, but at the origin of transfer during conjugation.
Array of
Elf64_Shdr
structs.Each entry contains metadata about a given section.
e_shoff
of the ELF header gives the starting position, 0x40 here.e_shentsize
and e_shnum
from the ELF header say that we have 7 entries, each 0x40
bytes long.So the table takes bytes from 0x40 to
0x40 + 7 + 0x40 - 1
= 0x1FF.Some section names are reserved for certain section types: www.sco.com/developers/gabi/2003-12-17/ch4.sheader.html#special_sections e.g.
.text
requires a SHT_PROGBITS
type and SHF_ALLOC
+ SHF_EXECINSTR
Running:outputs:
readelf -S hello_world.o
There are 7 section headers, starting at offset 0x40:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .data PROGBITS 0000000000000000 00000200
000000000000000d 0000000000000000 WA 0 0 4
[ 2] .text PROGBITS 0000000000000000 00000210
0000000000000027 0000000000000000 AX 0 0 16
[ 3] .shstrtab STRTAB 0000000000000000 00000240
0000000000000032 0000000000000000 0 0 1
[ 4] .symtab SYMTAB 0000000000000000 00000280
00000000000000a8 0000000000000018 5 6 4
[ 5] .strtab STRTAB 0000000000000000 00000330
0000000000000034 0000000000000000 0 0 1
[ 6] .rela.text RELA 0000000000000000 00000370
0000000000000018 0000000000000018 4 2 4
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
The
struct
represented by each entry is:typedef struct {
Elf64_Word sh_name;
Elf64_Word sh_type;
Elf64_Xword sh_flags;
Elf64_Addr sh_addr;
Elf64_Off sh_offset;
Elf64_Xword sh_size;
Elf64_Word sh_link;
Elf64_Word sh_info;
Elf64_Xword sh_addralign;
Elf64_Xword sh_entsize;
} Elf64_Shdr;
There are unlisted articles, also show them or only show them.