Numbers that are signed (can have positive or negative values) have different ranges of values from numbers that are unsigned (positive only values) and it’s all down to a simple 1 or 0 – the vaklue of the leftmost bit in a byte. Why is that?
In this lesson, I explain exactly how each bit contributes a value to a given number and how that value can be switched from plus to minus. I also return to a problem I looked at some time ago: why do big positive numbers sometimes get changed to negative?
MORE LESSONS
=============
To follow all this series on bits, bytes and binary numbers, go to the “Down To The Metal” playlist:
https://www.youtube.com/playlist?list=PLZHx5heVfgEt8Ynevr3OX9UBKLPXdSMGM Lessons on specific topics:
Why Do Big Numbers Turn Negative?
https://youtu.be/LTCS8UMjJOA What is a Binary Number?
https://youtu.be/8-usRf9if-8 Bits, Bytes and Binary Numbers:
https://youtu.be/FD6m-5iNWqI Be sure to subscribe to the Code With Huw channel so that you get a notification when I upload more lessons in this series.
PROGRAMMING BOOKS
====================
If you want to learn programming in more depth (and also support this channel!) you might think of buying one of my books. I have written books on C programming, Using Pointers in C, Recursion and other programming topics. You can buy my books (paperback or Kindle) on Amazon.
“CODE WITH HUW” ON TWITTER:
=================================
https://nitter.net/codewithhuw “CODE WITH HUW” ON FACEBOOK:
=================================
https://www.facebook.com/CodeWithHuw Good luck! And good programming!
Tags