What is a Word in Arduino?

ArduinoHardwareSoftware & Coding

A word, very simply put, is an unsigned number of 2 bytes (or 16 bits). Thus, it can take in values from 0 to 65535.

Note that this definition is very microcontroller specific. In pure terms, a word is the amount of data a machine can process at a time, and it depends on the specifications of the machine.

For example, instead of Arduino Uno, if you use the ESP32 board, the word becomes a 32-bit unsigned int instead of 16-bit. This is because ESP32 has different specifications compared to Arduino Uno. int sizes on ESP32 are also larger than Arduino.

So, the bottom line is, whatever microcontroller or board you are using, make sure to check its specifications to understand what will one word correspond to.

How to Define a Word?

Defining a word is fairly straightforward −

word varName = value;


word myWord = 100;
Updated on 30-Jul-2021 15:06:48