public/subjects/blockchain/increment
nprimo 4fa5c876a7 docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00
..
README.md docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00

README.md

Increment

Cryptographic algorithms use a binary representation of variables internally (Buffer in nodejs). Hexadecimal representation is used to facilitate human reading. To get more familiar with the hexadecimal form, we will do a simple operation.

Instructions

Create a function increment that takes as argument a number written in hexadecimal form and returns the same number incremented by one.

Usage

increment('03') // expected : <Buffer 04>
increment('a0') // expected : <Buffer a1>
increment('ff') // expected : <Buffer 01 00>
increment('d537') // expected : <Buffer d5 38>

Notions