Fireship · @fireship
Learn Binary by Building a Binary Clock with Flutter
Uploaded November 25, 2019 · Length 11:34
Summary
Learn how to build a binary clock using Flutter, including understanding binary numbers and converting timestamps to binary.
- flutter binary clock
- binary numbers explained
- binary time conversion
- flutter clock tutorial
- binary clock building
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
today we're going to use flutter to
- 0:01
build a clock and not just any ordinary
- 0:03
clock but a binary clock just a few days
- 0:06
ago the flutter team launched a new
- 0:07
competition where the goal is to build
- 0:09
the most beautiful clock face I don't
- 0:11
plan on entering this competition myself
- 0:12
so this video is more of a QuickStart
- 0:14
guide to get you started building your
- 0:15
own clock from scratch as you'll see in
- 0:17
a few minutes
- 0:18
building a clock and flutter is really
- 0:20
easy so in order to make this video a
- 0:21
little more challenging I also want to
- 0:23
teach you everything you didn't know
- 0:24
about binary and if you're entering the
- 0:26
flutter clock competition make sure to
- 0:28
watch until the end of the video because
- 0:29
I'll be sharing additional clock ideas
- 0:31
there that you're more than welcome to
- 0:32
steal from me if you're new here like
- 0:34
and subscribe and you can grab the full
- 0:36
source code from fire ship IO in order
- 0:38
to build a binary clock we need to know
- 0:40
a little bit about how binary works in
- 0:42
mathematics a binary number is just a
- 0:44
number that has two possible States
- 0:46
which we can represent as a 0 or 1 you
- 0:49
can think of this logically as true or
- 0:50
false or electronically as on off and in
- 0:53
computer systems we call a single binary
- 0:55
value a bit now a single bit by itself
- 0:58
can't represent very much just two
- 1:00
values to be precise so how do we make
- 1:03
bits represent more complex data well we
- 1:05
simply combine them together when you
- 1:07
combine bits together it creates a
- 1:08
geometric series where the number of
- 1:10
different values we can represent is
- 1:12
determined by 2 to the power of the
- 1:14
number of bits that we have so 2 to the
- 1:16
power of 1 equals 2 which means we can
- 1:18
represent two things 2 to the power of 2
- 1:21
is 4 so we can represent 4 things with 2
- 1:23
bits but when talking about bits we
- 1:25
usually think about them grouped in
- 1:26
series of 8 which is a single bite a
- 1:29
bite would be 2 to the power of 8 which
- 1:31
can represent 256 different things now
- 1:34
the reason we call 8 bits a byte is
- 1:36
somewhat arbitrary it's just a good even
- 1:38
number and contains a enough space for
- 1:40
all the letters of the alphabet and
- 1:42
uppercase and lowercase for example you
- 1:44
may have heard of utf-8 which stands for
- 1:46
8 bit Unicode transformation format it
- 1:48
encodes millions of different characters
- 1:50
from languages around the world
- 1:51
including emojis and does so by
- 1:53
combining 1 2 4 8 bit bytes together so
- 1:56
whenever you use Unicode characters in
- 1:58
your code which is all the time each
- 1:59
character is actually encoded to a


