Mission

To provide a learning environment and to assist in robotics projects or really just any hobby related to engineering. There are lessons, project tutorials, and even sensor documentation with usage examples.

Images from Posts

Using Node.js as a web server
A screenshot of the main page, which is the static form.html file, A screenshot of the dynamically generated response to the form.
A screenshot of the dynamically generated response to the form.
Using Node.js as a web server
A screenshot of the main page, which is the static form.html file, A screenshot of the dynamically generated response to the form.
A screenshot of the main page, which is the static form.html file
LCD - Sainsmart HD44780 / LCD2004
Overview, lights off, Back side, Backlight
Back side
LCD - Sainsmart HD44780 / LCD2004
Overview, lights off, Back side, Backlight
Overview
LCD - Sainsmart HD44780 / LCD2004
Overview, lights off, Back side, Backlight
lights off
LCD - Sainsmart HD44780 / LCD2004
Overview, lights off, Back side, Backlight
Backlight
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

Categories

Optimized Multiple Pin Reads

Submitted by Evan Boldt on Wed, 01/30/2013 - 17:09
Topics

Memory Addressing

First, to understand why things are done this way, it should be known that a bool (boolean true/false) is only 1 bit. 1 for true, 0 for false. However, computers have an addressing system for memory, which cannot go directly to a single bit. An address usually goes to a 8 bit chunk of memory (a byte), which is also usually the same size as an int data type.

Think of it like trying to write a postal address to a room in a house. The address will take you to the house, but not inside. So, we can't just keep it in its own variable.

Furthermore, it would be wasteful to waste 7 bits for every bool declared. 8 bools can be put all into one integer - all next to each other in memory - to save space. How do you seperate them? How do you get just one bit out of a chunk of bits? With boolean logic!