Jump to content

Sensei

Senior Members
  • Content Count

    5990
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Sensei

  1. Instruction is special data in computer memory. Program is sequence of instructions. CPU reads instruction from address specified by special register with name PC (Program Counter). (Read articles below) https://en.wikipedia.org/wiki/Program_counter After reading it, CPU starts executing assigned to instruction operation and PC is incremented by length of the all arguments taken by instruction (it is variable in the most of CPUs and depends on instruction). Different CPUs have different instruction sets. The same value might mean something else (different operation) depending on which CPU is used. Therefore program compiled to one processor is not working with different processor or with different architecture (see below). Even the most basic ANSI C complaint program, requires recompilation if intended to be used on different CPU. There is yet another special kind of register: CPU flags register. https://en.wikipedia.org/wiki/FLAGS_register The most important (and common to the all modern processors) are: Zero, Carry, Overflow and Negative flags. https://en.wikipedia.org/wiki/Zero_flag https://en.wikipedia.org/wiki/Carry_flag https://en.wikipedia.org/wiki/Overflow_flag https://en.wikipedia.org/wiki/Negative_flag These allow computation and comparison of data by instructions. For instance, to check whether one data is equal to another data there is used virtual subtraction of them. Result is lost, nowhere stored, but flag register is updated instead. if data are equal subtraction of them gives zero, therefore Zero flag is set, and BEQ or BNE instructions (or equivalent with different name) can be used to perform jump. B.. is shortcut of Branch, J... is shortcut of Jump. EQ = EQual. NE = Not Equal. Relative jump means addition or subtraction of PC register. Absolute jump means setting PC register to fixed value (address of the next instruction to execute). Read articles: https://en.wikipedia.org/wiki/Instruction_set_architecture
  2. Feature for good guys. Vulnerability for evil guys. Dynamic generation and/or modification of the code to execute is state-of-the-art way to accelerate execution of the code. e.g. JIT. https://en.wikipedia.org/wiki/Just-in-time_compilation With memory protection for code, JIT becomes much more complicated than it can be in the normal circumstances (without "evil guys"). They had code on paper tape, equivalent of non-volatile ROM.
  3. Computer store data in bits. Bit can be 0 or 1. Sequence of 8 bits is byte. It can have values from 0...255 (because 2^8=256). Byte is also used as ASCII character (modern equivalent is Unicode which is 16 bits wide character in computer memory, and encoded in 1-4 bytes in various standards e.g. UTF-8 when it is stored in file). In this article you will find ASCII conversion table i.e. what ASCII code corresponds to which glyph. https://en.wikipedia.org/wiki/ASCII e.g. word "ASCII" is sequence of bytes 65,83,67,73,73. Computer does not know the true meaning of human language words. More information about Unicode standard: https://en.wikipedia.org/wiki/Unicode https://en.wikipedia.org/wiki/Glyph
  4. The basic alcoholmeter is just measuring density of liquid. It costs less than 10 usd on e.g. ebay. https://en.m.wikipedia.org/wiki/Hydrometer You can easily convert saccharometer to alcoholmeter. Get reference 96% ethanol in the shop and add precisely measured amount of water. Record equivalent saccharometer readings. Repeat.
  5. Are you familiar with permeability and permittivity? https://en.wikipedia.org/wiki/Permeability_(electromagnetism) https://en.wikipedia.org/wiki/Permittivity You can reflect, refract, or absorb, or emit photons in radio wave spectrum.. Did you hear about Faraday cage? https://en.wikipedia.org/wiki/Faraday_cage "A Faraday cage or Faraday shield is an enclosure used to block electromagnetic fields." ..and yet another gap in your electromagnetism's knowledge is magnetic domains.. https://en.wikipedia.org/wiki/Magnetic_domain "A magnetic domain is a region within a magnetic material in which the magnetization is in a uniform direction. This means that the individual magnetic moments of the atoms are aligned with one another and they point in the same direction. When cooled below a temperature called the Curie temperature, the magnetization of a piece of ferromagnetic material spontaneously divides into many small regions called magnetic domains. The magnetization within each domain points in a uniform direction, but the magnetization of different domains may point in different directions. Magnetic domain structure is responsible for the magnetic behavior of ferromagnetic materials like iron, nickel, cobalt and their alloys, and ferrimagnetic materials like ferrite. This includes the formation of permanent magnets and the attraction of ferromagnetic materials to a magnetic field. The regions separating magnetic domains are called domain walls, where the magnetization rotates coherently from the direction in one domain to that in the next domain. The study of magnetic domains is called micromagnetics."
  6. Update: 22 millions jobless people in the USA. Within four weeks. https://edition.cnn.com/2020/04/16/economy/unemployment-benefits-coronavirus/index.html How well and wisely these people spend their "vacations".. ? I would suggest them to read and learn C/C++ from e.g. https://www.cplusplus.com/ and/or web design/programming https://www.w3schools.com/ and/or PHP https://www.php.net/ and other computer related activities, which can be remotely performed. It will more wisely spent time that on the front of TV watching entire Netflix all day long.. There are migrants who don't know language. It is good moment to teach them English. Because everything in USA spins around money, everybody should get prepaid Visa/Mastercard with their name, uploaded with money once a day e.g. $30-$50. Person goes to special on-line training website. Performs tests and when they are okay, extra money appears on their prepaid card. We have teaching connected with economic help. For instance, language teaching on-line website could have dictionary of English words or entire sentences. It randomly picks up word/sentence, and couple equivalent meaning to select by user the right one. If somebody selects wrong version, the right one is highlighted (perhaps with image of thing or action, context in which it is used etc.), and new question appears. It should have play button to hear sound sample of word/sentence. It is repeated cycle for e.g. 20, 50, 100 words to learn per day, adjusted to skill of individual. After doing this test for a few hours, even not really bright person, will pick up the right words/sentences. At the end, there is uploaded extra money with amount correlating to score (amount of good/bad answers). System remembers which words/sentences individual learned, and only occasionally rechecks them in the future, giving every day new set of words/sentences.
  7. You can easily do it with them ruining shots. You just have to make a few photos from tripod, instead of just one *). Then in Photoshop you place one photo in background layer, other one in foreground layer, etc. with the rest, if more photos have been taken, and then use eraser tool. It reveals what is in below layer. It is kinda entertaining. Newer Photoshop versions can even do it automatically analyzing sequence of images. See this tutorial: *) I always do multiple shots of the same scene. Because one might be out of focus.
  8. Sensei

    Voting By Mail

    South Korea holds traditional elections on 15 April 2020 (today). See the crowds in front of the offices. If some of them are infected without symptoms it must end up with catastrophe. Just wait one or two weeks... https://www.theguardian.com/world/2020/apr/14/south-korea-votes-in-first-national-election-of-coronavirus-era http://www.apimages.com/Search?query=lee+jin+man+virus
  9. But "RTFM" is the best generic lesson for programmer-to-be, presented in easy to remember and humorous form. The majority of answers for questions programmer will have in the future every day work, are answered in manuals, docs, and in comments made by other programmers, who wrote below manual the main page, in articles leaved for other programmers. "RTFM" should not be taken personally.
  10. 1) Did you read ArrayList class, the all superclasses and interfaces manuals? To do it you use search engine with the name of class, and the name of language that you're using e.g. "ArrayList java" (because ArrayList is present also in the .NET Framework in C#/C++ on MSDN, but has different methods and syntax). https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html If you are not familiar with this class, that is where you should start. By reading docs. Every programmer does it. RTFM = Read The Fucking Manual. 2) How to enumerate entries in ArrayList class? 3) How to check whether two following entries are in the right order? ps. If you don't know what to do, RTFM! Print it on your T-Shirt.
  11. In this video author showed something exactly reverse: Just checked. My Android smartphone is clearly showing whether my remote IR pilot is sending signal or not. A 940 nm wavelength LED is typically used in remote controllers. [ref]
  12. Reverse maths going from the end of this sentence to the beginning. i.e. 360$ is needed. Each driveway gives $18. How many driveways is needed? Then continue with the rest paying attention to units/dimensions.. "driveway" can be considered as unit/dimension as well. Did you have "cancelling units"/"dimensional analysis"/"unit analysis" on physics or eventually on chemistry lessons? https://www.google.com/search?q=cancel+of+units
  13. ...tides are created by gravitational pull of the Moon..
  14. Reminds me disappearance of Kamino planet embarrassing scene in Star Wars universe: Human cannot search extraterrestrial intelligent life forms in star systems whose data and existence have been removed from the database on purpose. How to prevent extraterrestrial invasion of Earth in the future? One way, is to modify their databases, and pretend the Sun is not here, and the Earth does not exist. But it can work in the reverse direction.
  15. Sensei

    Sea level

    It is approximation which works for cans, glasses, aquariums etc. Attempt to calculate the real value for Earth case would be much harder. You would have to check how much of land lies below 1.5m or 1.9m altitude and include them in calculations.. When ocean water level rises lands are flooded.
  16. It requires external source of the energy. Some deep cosmos spaceships use decay energy from radioisotopes e.g. Plutonium (energy from the Sun is too low) https://en.m.wikipedia.org/wiki/Radioisotope_heater_unit
  17. Physics simulation engines split time to slices ("frames") e.g. 1/1000 of second. Every frame there are recalculated positions, velocities, accelerations, forces etc. Small imprecisions of floating point math adds up together. You can start with literally single object at 0,0,0 with velocity 1,0,0 and after a few seconds notice that object is not exactly at positions 1... 2... 3... 50... 1000.. as you would expect but e.g. 999.999x etc. etc.
  18. Typical game engine uses flat geometry i.e. gravity force vector is toward the ground in straight line in Y axis when in the reality it is toward center of mass, ~ core of the Earth. Game playfields are flat. Earth is spherical. Typical game engine has no air resistance, so if you would make e.g. pendulum it could work forever. Potential energy of bob is transformed to kinetic energy and then back to potential energy with the same amount. Without air resistance only imprecision of floating point numbers could lead to stopping it. Pay special attention to imprecision of the floating point math.
  19. Sensei

    Voting By Mail

    swansont, your description of United States sounds like hell on Earth... ...for some people..
  20. https://erj.ersjournals.com/content/early/2020/03/26/13993003.00688-2020 "Smokers and individuals with COPD have increased airway expression of ACE-2, which is the entry receptor for the COVID-19 virus. "
  21. https://en.wikipedia.org/wiki/Fukushima_Daiichi_nuclear_disaster#Hydrogen_explosions
  22. Two things are needed for fire: fuel and oxygen. Fuel without free access to Oxygen won't burn. Therefore the main way to shutdown fire is to use already burned hydrogen oxide. Water. However, at really really high temperature fires water molecule could be split to gaseous Hydrogen and gaseous Oxygen, which can lead to explosion. Such things happened in e.g. nuclear plants. Water used to cool down nuclear reactor has been split to gaseous Hydrogen, which later exploded and damaged nuclear plants.
  23. Sensei

    God in troubles...

    You know it is not true. One life form relies on other life form. There is fixed *) quantity of Carbon, Oxygen, Nitrogen and Hydrogen atoms, which are building blocks of the all organic molecules. And they are transferred one way or another from one life form to another. *) new one created in fusion, fission, radioactive decay etc.
  24. Sensei

    God in troubles...

    "diseases" are yet other life forms... Human beings think about themselves as superior to any other life forms.. While in the reality majority of life are single cell microorganisms.. If somebody would like to spread life to the entire Universe, should eject billions of billions of bacteria into cosmic space.. After millions or billions of years, one or a few lucky one survivors, would reach extraterrestrial appropriate environment and after a few next billions of years would evolve to millions of higher level multicellular life forms, perhaps intelligent one.. and repeat cycle once again.. Why God cannot get rid of "diseases"? Because the all higher level microorganisms, including human beings, relies on existence of single cellular life forms!
  25. Sensei

    God in troubles...

    ...are you in "deep learning mode".. my child?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.