High Definition Standard Definition Theater
Video id : LTCS8UMjJOA
ImmersiveAmbientModecolor: #e1dac8 (color 1)
Video Format : 22 (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: Opus - Normalized audio
PokeTubeEncryptID: 0a6d345f42fa309cf42f6c6f9b6d680d55073e35567e9e80eb10767f7baaccc7ae2283aa12df514021ec2e3e039f5f34
Proxy : eu-proxy.poketube.fun - refresh the page to change the proxy location
Date : 1715710115117 - unknown on Apple WebKit
Mystery text : TFRDUzhVTWpKT0EgaSAgbG92ICB1IGV1LXByb3h5LnBva2V0dWJlLmZ1bg==
143 : true
Why Do Big Numbers Turn Negative (in computer programs)?
Jump to Connections
1,348 Views ā€¢ Jun 9, 2022 ā€¢ Click to toggle off description
A student of one of my courses asked me why addresses are sometimes shown as negative values when they are displayed as decimal integers in C. The answer is not obvious. It turns out that this is a side-effect of assigning very large numbers and it can cause unexpected results in all kinds of odd places that have nothing at all to do with addresses. And it doesnā€™t only affect C programs either.

In this video, I go riding the ranges to track down the mystery of unexpected negative numbers.

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:
=================================
twitter.com/codewithhuw

ā€œCODE WITH HUWā€ ON FACEBOOK:
=================================
www.facebook.com/CodeWithHuw

Good luck! And good programming!
Metadata And Engagement

Views : 1,348
Genre: Education
Date of upload: Jun 9, 2022 ^^


Rating : 5 (0/58 LTDR)
RYD date created : 2024-03-02T16:58:01.669586Z
See in json
Tags
Connections

YouTube Comments - 4 Comments

Top Comments of this video!! :3

@NikolaNevenov86

1 year ago

could this be linked to how ints are represented in bits? Like a number that is 0111 is incremented by 1 it will become 1000. In signed ints the last bit is set as the + or - sign. So the number 7(0111) will become -8(1000) if we follow the two complement rule and any addition to (1000) will start decreasing the number like 1001 is -7.

|

@greywolf271

9 months ago

Don't learners try to teach themselves anymore ? Don't you get tired of listening to simple questions that can be answered by reading a textbook and using your brain ?

|

Go To Top