<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>programming for beginners Archives - NeuralLantern.com</title>
	<atom:link href="https://www.NeuralLantern.com/tag/programming-for-beginners/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.NeuralLantern.com/tag/programming-for-beginners/</link>
	<description></description>
	<lastBuildDate>Tue, 15 Jul 2025 02:58:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.NeuralLantern.com/wp-content/uploads/2025/04/cropped-2025-04-04-Lantern-03-32x32.png</url>
	<title>programming for beginners Archives - NeuralLantern.com</title>
	<link>https://www.NeuralLantern.com/tag/programming-for-beginners/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Input Double Precision Floating Point Numbers in C: Step-by-Step Guide with Error Handling</title>
		<link>https://www.NeuralLantern.com/how-to-input-double-precision-floating-point-numbers-in-c-step-by-step-guide-with-error-handling/</link>
					<comments>https://www.NeuralLantern.com/how-to-input-double-precision-floating-point-numbers-in-c-step-by-step-guide-with-error-handling/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Tue, 15 Jul 2025 02:58:41 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[C input validation]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[C tutorial]]></category>
		<category><![CDATA[coding tutorial]]></category>
		<category><![CDATA[double precision float]]></category>
		<category><![CDATA[error handling in C]]></category>
		<category><![CDATA[fgets in C]]></category>
		<category><![CDATA[input in C]]></category>
		<category><![CDATA[programming for beginners]]></category>
		<category><![CDATA[sscanf in C]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=180</guid>

					<description><![CDATA[<p>Learn to input double precision floats in C with this easy guide! Covers fgets, sscanf, error handling, and code examples for beginners.</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-input-double-precision-floating-point-numbers-in-c-step-by-step-guide-with-error-handling/">How to Input Double Precision Floating Point Numbers in C: Step-by-Step Guide with Error Handling</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="How to Input Double Precision Floating Point Numbers in C: Step-by-Step Guide with Error Handling" width="1380" height="776" src="https://www.youtube.com/embed/-sBQdPUd-IM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Want to learn how to input double precision floating point numbers in C? This beginner-friendly tutorial walks you through the process step-by-step, showing how to use fgets and sscanf to get user input, validate it, and handle errors like a pro. With clear code examples and a simple program demo, you’ll see how to check if input succeeds or fails. Perfect for C programming newbies or anyone looking to sharpen their skills. Subscribe for more practical coding tips and tutorials!</p>



<p>Introduction 00:00:00<br>Overview of Inputting Doubles 00:00:02<br>Program Setup and Includes 00:00:44<br>Main Function Explanation 00:01:13<br>Get Input Function Introduction 00:02:10<br>Defining Get Input Function 00:02:34<br>Character Buffer Creation 00:02:54<br>Using fgets for Input 00:03:49<br>Parsing Input with sscanf 00:06:33<br>Handling Success and Failure 00:08:07<br>Running the Program 00:09:05<br>Testing with Valid Input 00:09:20<br>Testing with Invalid Input 00:10:05<br>Conclusion and Call to Action 00:11:50</p>



<p>Thanks for watching!</p>



<p>Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>
</ul>



<p>Please help support us!</p>



<ul class="wp-block-list">
<li>Subscribing + Sharing on Social Media</li>



<li>Leaving a comment or suggestion</li>



<li>Subscribing to our Blog</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p>Hey there!</p>



<p>In this video I&#8217;m going to show you how to input a double precision floating point number</p>



<p>in C from the user into your program and decide whether or not it has succeeded or failed.</p>



<p>Okay so for starters I just want you to know that this video is not about generating makefiles.</p>



<p>own make files or how to compile link execute or even the basics of c see my other videos for now</p>



<p>i&#8217;m just going to assume that you know how to make a make file here it is basically very quickly</p>



<p>but i&#8217;m just i&#8217;m just compiling a simple program here&#8217;s my program here it&#8217;s called main.c it</p>



<p>doesn&#8217;t really have anything else to it i&#8217;m going to start off by importing a couple includes or a</p>



<p>few includes that&#8217;ll just help me get some stuff that i need so here&#8217;s an include for the standard</p>



<p>input output here&#8217;s an include for the standard library here&#8217;s an include that</p>



<p>helps with c string functions here&#8217;s an include that helps with limits not</p>



<p>actually sure every single one of those includes is needed but we&#8217;ll see anyway</p>



<p>here&#8217;s my main program or I guess my main function since this program only is</p>



<p>just one module notice how we have a double called value here and then we</p>



<p>make a call to a function called get input and we give a pointer to to the</p>



<p>double as an argument to get input so basically get input should be able to just return to us</p>



<p>the value by reference and then get input will be able to tell us whether or not it has succeeded</p>



<p>as in has the user entered valid input by its return type or not not its return type but its</p>



<p>return value so the result is going to be a long from get input and that&#8217;ll indicate</p>



<p>runs we&#8217;re just going to print you know get input returned and then print the return value that it</p>



<p>returned and then it&#8217;s going to print the double that it inputted from the user and then a new line</p>



<p>so nothing uh nothing too big of a deal let me show you the main workhorse function that has</p>



<p>all the logic you need to input from the user and check that the input was valid so this is called</p>



<p>get input i&#8217;m sticking it on top of the main function because i don&#8217;t want to deal with</p>



<p>because I don&#8217;t want to deal with prototypes right now.</p>



<p>It&#8217;s a better idea to put prototypes up at the top of your source code file</p>



<p>if your source code is even a little bit complicated.</p>



<p>But in this case, it&#8217;s just one other function.</p>



<p>So I will just put get input on top of main.</p>



<p>That way, when the compiler is scanning the source code,</p>



<p>it will have already seen that get input exists before main calls it,</p>



<p>and it&#8217;ll compile.</p>



<p>So first thing I&#8217;m going to do is say that get input returns along</p>



<p>get input returns along like we just saw and it takes in a pointer to a double no references just</p>



<p>a pointer then we have to create a character buffer and what that&#8217;s going to be for is basically</p>



<p>you know the user is going to type some characters and i want that to go into the buffer so um</p>



<p>a line max is the number of characters that the buffer can hold and that&#8217;s uh i think where we</p>



<p>I think where we have limits, I think limits is providing that for us.</p>



<p>But basically, you know, you could stick a number here if you wanted to like an eight</p>



<p>character, eight kilobyte buffer, if you wanted like eight, one, nine, two, or just whatever.</p>



<p>I&#8217;m just putting line max so that it sort of aligns with the system&#8217;s idea of what</p>



<p>the maximum size of a line should be.</p>



<p>Okay.</p>



<p>So then I don&#8217;t know why I have it say grab side one.</p>



<p>I&#8217;ll just say grab input here.</p>



<p>Let me change my solution real fast.</p>



<p>Grab input.</p>



<p>That&#8217;s probably because that was part of a program.</p>



<p>that&#8217;s probably because that was part of a program in the past so then the function that I&#8217;m going to</p>



<p>actually use is called fget s which basically is saying let&#8217;s uh let&#8217;s input a string a c string</p>



<p>from a file and we&#8217;re providing the target for the input so that&#8217;s going to be the character string</p>



<p>right there and then we&#8217;re going to provide um the maximum number of characters that we&#8217;ll accept</p>



<p>length of the buffer and then what file are we going to input from standard</p>



<p>input if you don&#8217;t know standard input see my other videos but it&#8217;s basically a</p>



<p>special file handle that means when the program first launches you know the</p>



<p>operating system sort of gives it a special file handle for standard input</p>



<p>standard output standard error and so this will be basically the user typing</p>



<p>on the terminal so f get s will essentially take input from standard</p>



<p>terminal until they you know hit like a new line or they disconnect the input</p>



<p>buffer it will take up to this many characters line max which should match</p>



<p>the buffer whatever value you put in the buffer and then it will write the</p>



<p>characters into the buffer that&#8217;s why you have to match the length of the</p>



<p>buffer so basically here this function call will return something if it returns</p>



<p>a zero then that means we have failed so if it returns null then we&#8217;re going to return zero</p>



<p>meaning fail so get input is kind of a boolean even though we don&#8217;t have booleans in c and it&#8217;s</p>



<p>basically going to return a zero on a failure and a one on success so like you know zero is a falsy</p>



<p>value and one is a truely value so we&#8217;re not going to use system style return codes where zero is</p>



<p>codes where zero is success we&#8217;re going to use boolean style return codes where a zero is failure</p>



<p>and one is uh success so you can see i&#8217;ve kind of chained two commands here i&#8217;ve decided to say all</p>



<p>right um we&#8217;ll first grab some input into the buffer array with f get s if that is null then</p>



<p>we immediately return zero because this this logical or operator says if one or the other thing</p>



<p>is equal to a true then just go ahead and evaluate to true so here I&#8217;m asking like did the call</p>



<p>equal null if the answer is yes then that part will evaluate to true and then it&#8217;ll basically</p>



<p>short circuit the rest of that logical expression and just return zero right away and then if the</p>



<p>previous command succeeds like the fget s succeeds then it will look at the buffer and try to scan it</p>



<p>for valid input.</p>



<p>So the left side is just taking raw input.</p>



<p>The right side is parsing for certain data type.</p>



<p>So you can see sscanf,</p>



<p>we&#8217;re scanning a buffer that we put into the first argument.</p>



<p>So that&#8217;s at that point, by the time sscanf gets called,</p>



<p>the buffer should be filled</p>



<p>with whatever input the user typed.</p>



<p>So we&#8217;re scanning that</p>



<p>and then here&#8217;s a little formatting argument,</p>



<p>which is very similar to,</p>



<p>use the same tokens basically as printf. So, you know, here we&#8217;re saying percent lf. So we&#8217;re</p>



<p>looking for a long float, which means a double precision floating point number. And that</p>



<p>percentage just means like, here&#8217;s a special token that comes after it to describe what sort of</p>



<p>value we&#8217;re looking to scan for. So then if we&#8217;re successful, if it actually scans,</p>



<p>the double. So fscanf expects a pointer to the variable that&#8217;s going to receive the value that</p>



<p>has been scanned if it is scanned correctly. So notice how the double we don&#8217;t have an ampersand</p>



<p>in front of it because it&#8217;s already a pointer because it came into us as a pointer in the first</p>



<p>place. So we&#8217;re going to look at the buffer that the user just typed, the user just provided,</p>



<p>and we&#8217;re going to try to scan for a double precision floating point number. If we&#8217;re</p>



<p>then the system should write that double into the variable referred to by the</p>



<p>pointer known as the double if all that succeeded then the value should be</p>



<p>greater than or equal to zero if these if this command failed then the value</p>



<p>should be less than one so that basically means if we have a value of</p>



<p>less than one then we have failed and we&#8217;re going to return zero so now whether</p>



<p>the initial scanning sorry whether the initial input fails or the parsing of</p>



<p>the users input fails then we&#8217;re gonna end up returning zero for fail so then</p>



<p>in main you can see all we&#8217;re doing is we&#8217;re just calling on input we&#8217;re giving</p>



<p>it a pointer to the double that we want to populate and then we&#8217;re looking at</p>



<p>the result so in your you know program logic you can do something like if the</p>



<p>result is zero then assume we failed and if the result is one assume we succeeded</p>



<p>And if the result is one, assume we succeeded and, you know, respond to the user or, you</p>



<p>know, do something that&#8217;s appropriate for success or fail.</p>



<p>I think that&#8217;s everything that I need to explain.</p>



<p>Let&#8217;s try to run the program now.</p>



<p>Open a terminal.</p>



<p>I want to do make run and see if that works.</p>



<p>Maybe I&#8217;ll do a clear here.</p>



<p>Okay.</p>



<p>So I didn&#8217;t print any, you know, prompting or anything special.</p>



<p>so the cursor is just blinking at this point i can just enter 33.12 i guess whatever hit enter</p>



<p>and the program now says get it get input returned one which means success so the value that i entered</p>



<p>was a valid double and the value is now 33.12 so it successfully grabbed the float keep in mind</p>



<p>these zeros or just precision related issues are related to the printing of the double not</p>



<p>not necessarily related to what is inside of the double so I&#8217;m just saying</p>



<p>you know print along float you can you can mess with print F a little bit more</p>



<p>if you want to have a different value printed or more precision or less</p>



<p>percent precision printed let&#8217;s try to do this with some invalid input I&#8217;m just</p>



<p>going to do some letters and hit enter notice how the value didn&#8217;t actually</p>



<p>change it&#8217;s it started or actually it did change it got set to a zero because</p>



<p>initialized it as junk data so it got set to a zero but then more importantly get input returns</p>



<p>zero as its return code so when you see zero that means the command failed so you should not consider</p>



<p>the double as valid in any way you shouldn&#8217;t use it you should complain to the user or do whatever</p>



<p>and that is how to get input let&#8217;s just try something for fun double value equals 3.333</p>



<p>bad input i&#8217;m assuming it might but i haven&#8217;t done this in a while so we&#8217;ll see so bad input</p>



<p>and looks like it did not change it so whatever junk data was already in value by the time you</p>



<p>called on get input if get input failed then the value should probably be unchanged but again more</p>



<p>importantly the return value is zero meaning fail because zero is a falsy value so i&#8217;m going to get</p>



<p>so i&#8217;m going to get rid of that so i can go back to my solution there okay so now hopefully you are</p>



<p>uh you&#8217;re on your way to start getting input in c at least in the in in terms of longs uh you can</p>



<p>look up the formatting codes for print f if you would like to input different types of data like</p>



<p>so this video is just for long floats doubles uh you can you can look up all other all sorts of</p>



<p>five years I&#8217;ll make another video that has different types of tokens but I guess that&#8217;s</p>



<p>it for this video. Thanks for watching I hope you learned a little bit and had a little bit of fun.</p>



<p>See you in the next one.</p>



<p>Hey everybody thanks for watching this video again from the bottom of my heart I really</p>



<p>appreciate it. I do hope you did learn something and have some fun. If you could do me a please</p>



<p>subscribe and follow this channel or these videos or whatever it is you do</p>



<p>on the current social media website that you&#8217;re looking at right now it would</p>



<p>really mean the world to me and it&#8217;ll help make more videos and grow this</p>



<p>community so we&#8217;ll be able to do more videos longer videos better videos or</p>



<p>just I&#8217;ll be able to keep making videos in general so please do do me a</p>



<p>kindness and and subscribe you know sometimes I&#8217;m sleeping in the middle of</p>



<p>the night and I just wake up because I know somebody subscribed or followed it</p>



<p>followed it just wakes me up and I get filled with joy that&#8217;s exactly what</p>



<p>happens every single time so you could do it as a nice favor to me or you could</p>



<p>you control me if you want to just wake me up in the middle of the night just</p>



<p>subscribe and then I&#8217;ll just wake up I promise that&#8217;s what will happen also if</p>



<p>you look at the middle of the screen right now you should see a QR code which</p>



<p>you can scan in order to go to the website which I think is also named</p>



<p>somewhere at the bottom of this video and it&#8217;ll take you to my main website</p>



<p>where you can just kind of like see all the videos I published and the services</p>



<p>videos I published and the services and tutorials and things that I offer and all that good stuff</p>



<p>and uh if you have a suggestion for uh uh clarifications or errata or just future videos</p>



<p>that you want to see please leave a comment or if you just want to say hey what&#8217;s up what&#8217;s going on</p>



<p>you know just send me a comment whatever I also wake up for those in the middle of the night I</p>



<p>get I wake up in a cold sweat and I&#8217;m like it would really it really mean the world to me I</p>



<p>it. So again, thank you so much for watching this video and enjoy the cool music as I fade</p>



<p>into the darkness, which is coming for us all.</p>



<p>Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-input-double-precision-floating-point-numbers-in-c-step-by-step-guide-with-error-handling/">How to Input Double Precision Floating Point Numbers in C: Step-by-Step Guide with Error Handling</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/how-to-input-double-precision-floating-point-numbers-in-c-step-by-step-guide-with-error-handling/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Caveman Debugging: Simple Trick to Debug C++ Code Like a Pro!</title>
		<link>https://www.NeuralLantern.com/caveman-debugging-simple-trick-to-debug-c-code-like-a-pro/</link>
					<comments>https://www.NeuralLantern.com/caveman-debugging-simple-trick-to-debug-c-code-like-a-pro/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Wed, 11 Jun 2025 19:56:00 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[assembly debugging]]></category>
		<category><![CDATA[beginner coding]]></category>
		<category><![CDATA[c++ debugging]]></category>
		<category><![CDATA[c++ tutorial]]></category>
		<category><![CDATA[caveman debugging]]></category>
		<category><![CDATA[code troubleshooting]]></category>
		<category><![CDATA[coding hacks]]></category>
		<category><![CDATA[coding tips]]></category>
		<category><![CDATA[debug c++]]></category>
		<category><![CDATA[debug code fast]]></category>
		<category><![CDATA[fix code bugs]]></category>
		<category><![CDATA[print statement debugging]]></category>
		<category><![CDATA[programming for beginners]]></category>
		<category><![CDATA[programming tutorial]]></category>
		<category><![CDATA[software development]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=151</guid>

					<description><![CDATA[<p>Master caveman debugging! Easy C++ trick to fix code fast with print statements. Clear tips for beginners &#038; pros. Watch now to squash bugs!</p>
<p>The post <a href="https://www.NeuralLantern.com/caveman-debugging-simple-trick-to-debug-c-code-like-a-pro/">Caveman Debugging: Simple Trick to Debug C++ Code Like a Pro!</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Caveman Debugging: Simple Trick to Debug C++ Code Like a Pro!" width="1380" height="776" src="https://www.youtube.com/embed/hsGaRukvpF8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Hey coders! Ever hit a wall with a program that just won’t work? In this video, I’m spilling the beans on caveman debugging—a super simple, no-fuss way to hunt down bugs in your C++ code (or any language, from assembly to Python)! No need to wrestle with complex debuggers; this method is all about using print statements to trace what your code is doing, step by step.</p>



<p>I’ll show you a real C++ program where things go wrong (think integer overflows and mystery crashes) and walk you through how to sprinkle in cout statements to spot the problem fast. You’ll learn how to label decision points like loops and if-statements, break down complex expressions with temporary variables, and format your debug output so it’s easy to read. Plus, I share a neat trick called short circuiting to toggle your debug prints on or off without deleting them—saving you tons of time!</p>



<p>Whether you’re a beginner just starting out or a pro debugging a massive codebase, caveman debugging is a lifesaver. It’s quick, it’s intuitive, and it fits my “let’s figure this out” vibe perfectly. Stick around to see how I catch a sneaky bug in a for-loop and fix it in minutes.</p>



<p>Why watch?</p>



<ul class="wp-block-list">
<li>Learn a beginner-friendly debugging technique that works in any language.</li>



<li>See real code examples with clear, relatable explanations.</li>



<li>Get tips to make your debug output readable and avoid hours of frustration.</li>



<li>Discover how to short circuit print statements for reusable debugging.</li>
</ul>



<p>If you’re ready to level up your coding game and squash bugs like a champ, smash that play button! Don’t forget to subscribe and hit the bell for more coding tutorials, from beginner hacks to advanced tricks. Drop a comment if you’ve ever used caveman debugging or have a bug you need help with—I read every one! Check out my next video on using a proper debugger for even more debugging goodness.</p>



<p>Scan the QR code on-screen or visit my website (linked below) for more tutorials, services, and coding resources. Let’s keep the coding community growing—your support means the world! #CavemanDebugging #CodingTips #DebuggingHacks</p>



<p>Hey everybody! In this video I&#8217;m gonna try to familiarize you with a concept</p>



<p>called caveman debugging. It&#8217;s just as bad as it sounds but it&#8217;s really really</p>



<p>really useful. So suppose for the sake of argument you&#8217;re writing a program I&#8217;m</p>



<p>gonna show a C++ program here but this this concept is not just for C++</p>



<p>debugging it&#8217;s also for assembly and any other kind of language that you can come</p>



<p>other kind of language that you can come up with but suppose I have a program and I&#8217;m trying to</p>



<p>figure out why it&#8217;s not working so if you look at this program right here that I&#8217;ve kind of written</p>



<p>up already we have a main function here and we have like a little hello message that&#8217;s not my</p>



<p>name I love that name though and we have a variable a and then we just sort of do some nonsense to it</p>



<p>to try and compute a value for a when I say nonsense I mean literally I&#8217;m just I just made</p>



<p>I&#8217;m just I just made up instructions the point of this video is not to show you some advanced program</p>



<p>It&#8217;s just to show you that you know</p>



<p>This is how you can possibly debug a program that has gone awry</p>



<p>So you can imagine at home that this code you&#8217;re seeing right here might be your larger project your larger</p>



<p>Code base whatever it is that you&#8217;re doing that is not working for some reason and you&#8217;re not sure why</p>



<p>So, um, let me run the program real fast</p>



<p>It basically is just like a little for loop and then it just sort of</p>



<p>of you know not randomly but it just kind of increases the value of a for no reason</p>



<p>a bunch of times and then it calls a function that will crash later</p>



<p>so let me show you what happens when we try to run this program okay do do do</p>



<p>okay i want to go clear and make run if you don&#8217;t know how to do a make file or compile</p>



<p>or link or anything like that uh then go see my other videos so clear and make run</p>



<p>What did I do wrong?</p>



<p>TempResult was not declared in this scope.</p>



<p>Okay, well, this is now a video on reading compiler errors.</p>



<p>Line 59, I probably left something out.</p>



<p>Oh, because I just changed it.</p>



<p>I forgot to put it back in there.</p>



<p>Return tempResult, we should just return input times two.</p>



<p>And I&#8217;m just making this up.</p>



<p>It&#8217;s not really like a valid algorithm.</p>



<p>Okay, so we run our program.</p>



<p>We print the final result and we realize for some reason the final result is wrong.</p>



<p>result is wrong. So I don&#8217;t, I mean, I just made this up. So I don&#8217;t really know what the right</p>



<p>answer is. But just imagine that you are looking at some sort of an output, some sort of a final</p>



<p>state, maybe a crash. And you realize, oh, my program doesn&#8217;t work, but it&#8217;s too complicated</p>



<p>to figure out. Caveman debugging to the rescue. Caveman debugging kind of is as bad as it sounds.</p>



<p>It&#8217;s just really, really simple. But it&#8217;s also really useful, especially if you just want to do</p>



<p>on you don&#8217;t want to dive deep into a full-on debugger or do something more advanced it literally</p>



<p>is just printing a lot of things while your program is running i do it all the time i usually</p>



<p>don&#8217;t even go to a debugger unless i really get in trouble with like some huge mess um okay so</p>



<p>the first thing i&#8217;m going to say is in this for loop we uh you know we&#8217;re kind of like iterating</p>



<p>And so probably this is a good idea to announce that we&#8217;re iterating in the for loop.</p>



<p>So I&#8217;m just going to go Cout.</p>



<p>In C++, you know, we have the Cout object that we can use to stream texts to standard output,</p>



<p>which usually goes to the terminal.</p>



<p>So use whatever construct you&#8217;re using for your particular language.</p>



<p>So we&#8217;re going to do Cout.</p>



<p>And I should say also, if you&#8217;re programming in assembly,</p>



<p>if you are programming in assembly,</p>



<p>it&#8217;s a little bit more complicated than just writing a Cout.</p>



<p>little bit more complicated than just writing a C out you probably have to have some pre-computed</p>



<p>messages and then you can use a library to print a number to the screen or use printf to print stuff</p>



<p>to the screen but you can do it just takes a little bit longer so anyway conceptually I&#8217;m</p>



<p>just going to say this is the first iteration of my loop so I&#8217;m going to sort of announce it I&#8217;m</p>



<p>going to say main and then I&#8217;m going to call it main four or how about primary four or first four</p>



<p>but I want to try to label the for loop.</p>



<p>And maybe instead of leaving those parentheses blank,</p>



<p>I could say iteration number i right there,</p>



<p>or maybe I could do iteration i.</p>



<p>That would be pretty good.</p>



<p>Then I just have to replace the i with the actual variable i</p>



<p>so that the i keeps increasing.</p>



<p>So I&#8217;m just going to like do another stream operator here</p>



<p>and I&#8217;m going to say i.</p>



<p>Then I&#8217;ll print a new line.</p>



<p>we&#8217;ve got, you know, one iteration of our loop.</p>



<p>Maybe I should also print what is the current value of A</p>



<p>because the point of this, you know, weird nonsense code</p>



<p>is we&#8217;re coming up with a value for A, right?</p>



<p>So I should just print what A is at the top of each iteration of the for loop.</p>



<p>So I&#8217;m going to say A is equal to, and then do another A at the end of it.</p>



<p>And then maybe at the bottom of the for loop,</p>



<p>when the for loop is actually ending one of its iterations,</p>



<p>I can just say we&#8217;re at the bottom of the iteration so maybe I&#8217;ll put to end</p>



<p>iteration and then print the final value of a and then at the top I&#8217;ll say begin</p>



<p>iteration at this point you might start to feel like hey aren&#8217;t you using too</p>



<p>many words here like why can&#8217;t I just print a bunch of numbers I mean you</p>



<p>could but when you&#8217;re coding you need all the brainpower you can get to not</p>



<p>just code but to debug coding is already hard enough without making it harder</p>



<p>harder for yourself than you need it to be. So, you know, I see people all the time, they&#8217;re</p>



<p>trying to debug their code and they just like start printing numbers. And after not very long</p>



<p>at all, they&#8217;re looking at the debug output and they&#8217;re just like, what did that number mean?</p>



<p>Where is the number I&#8217;m looking for? It&#8217;s just a bunch of numbers. It&#8217;s harder to debug when you</p>



<p>do it that way. Do it the nice and pretty way. It just costs you a couple of extra keystrokes to do,</p>



<p>you know, nice letters and new lines and things, nice words, labels. Isn&#8217;t that still a lot better</p>



<p>Isn&#8217;t that still a lot better than debugging for an extra six hours?</p>



<p>Because you can&#8217;t really understand what you&#8217;re seeing.</p>



<p>Anyway, let me show you what this looks like so far with just those two lines added.</p>



<p>Now we can kind of see, alright, alright, on iteration number 61, where I was 61, then</p>



<p>this was the first value of A and then after that this was the second value of A, you know,</p>



<p>when we were finished with the iteration.</p>



<p>It seems to have gone up by a certain amount.</p>



<p>you know it was like a negative blah blah blah 836 and then negative blah blah blah 708 so it</p>



<p>kind of increased in value all right that&#8217;s a little bit helpful now it&#8217;s a really good uh</p>



<p>place to uh print our decision points so anytime in your code where you have an if or an else or</p>



<p>a function call or anything where you are kind of like you know making a decision or processing your</p>



<p>data in some way it&#8217;s probably a good idea to announce your decisions so i could say up here i</p>



<p>say up here i can go maybe i&#8217;ll say uh main first four and then i&#8217;ll call it uh maybe i&#8217;ll do a</p>



<p>double colon there and i&#8217;ll say top if just to make it easy to read that i&#8217;m kind of like at</p>



<p>the first if statement um maybe i&#8217;ll even put parentheses i&#8217;ll say a is more than 20 just to</p>



<p>kind of like name what i&#8217;m actually doing and then i could replace the a with the actual value of a</p>



<p>actual value of a so i could say a like that and maybe uh when i&#8217;m reading this later i might want</p>



<p>to kind of actually see the variable name so i could say uh you could just like put a as a string</p>



<p>and then maybe its value in parentheses or something like that do a new line um and then</p>



<p>maybe after that top thing i&#8217;ll say uh true to indicate that we&#8217;re inside of the the if statement</p>



<p>the if statement and then maybe at the bottom of that if statement we&#8217;ll just say</p>



<p>a is now true and we&#8217;ll say like a is now you know whatever the new value of a was so just</p>



<p>basically we&#8217;re announcing that we decided to go into this if block and then we announce what we</p>



<p>ended up changing a to and also you probably anytime you see a compound expression like this</p>



<p>You know B time something or a plus something or just you know a big part of multiple parts of the expression any expression</p>



<p>That&#8217;s more than just like one variable or one number. It&#8217;s probably a good idea if you break that up into temporary variables, too</p>



<p>and then</p>



<p>Print out each variable and I know that&#8217;s a lot of stuff to read but again it beats debugging for an extra six hours</p>



<p>I&#8217;m gonna leave that be for now though</p>



<p>leave that be and</p>



<p>I&#8217;m just gonna continue adding comments into the rest of the code. So I&#8217;m gonna do the second if block here</p>



<p>So I&#8217;m going to do the second if block here.</p>



<p>I&#8217;m going to say we&#8217;re in the first floor.</p>



<p>We&#8217;re in the bottom if more than 20 true.</p>



<p>And then we&#8217;ll print out what is the value of a after we&#8217;re finished.</p>



<p>We&#8217;ll say a is now is now whatever value for a.</p>



<p>And then I&#8217;ll do the same thing for this function call.</p>



<p>Because, you know, when I call this function, it&#8217;s going to change the value somehow.</p>



<p>So we&#8217;re going to do cout about to a plus equals f, you know, call to f.</p>



<p>And then inside the arguments, I&#8217;m obviously putting i plus 3.</p>



<p>But because i is a variable, we could just print that.</p>



<p>So I&#8217;m going to do quote, quote, and then just stick the actual i in there.</p>



<p>And then another new line.</p>



<p>a finished a plus equals f and then I&#8217;ll just say you know a is now you know a you know print the</p>



<p>new value of a you could also say a equal equal a and then print the value whatever you want but</p>



<p>the point is I&#8217;m just printing everything here so now let&#8217;s go down a little bit more because</p>



<p>there is a function call if you look at this function call down here here&#8217;s like some nonsense</p>



<p>being used here&#8217;s some other like you know disabled code really what i&#8217;m doing at the</p>



<p>very end is i&#8217;m just taking the input that the function received and i&#8217;m just multiplying it by</p>



<p>two and returning it so again imagine that your code is a lot more complicated than this</p>



<p>maybe input times two is actually input times two divided by three and then some other function</p>



<p>call and then some other this and some other that and whatever so a lot of people will just kind of</p>



<p>stuff like a really complicated expression in one line or one assignment or one return statement</p>



<p>And that&#8217;s super confusing because you can&#8217;t really be sure that every part of the expression is as you thought.</p>



<p>So it&#8217;s a really good idea to break it all up into parts and print each part.</p>



<p>So you could imagine that we have like a C out here and we&#8217;ll say C out, you know, begin F.</p>



<p>I&#8217;ll say like begin for F and then F receives an input of input.</p>



<p>Do an end L.</p>



<p>And then I&#8217;ll make a temporary variable here.</p>



<p>variable here I&#8217;ll say int temp results equals input times two and then I&#8217;ll</p>



<p>print that f and maybe I&#8217;ll do the input again</p>



<p>temp result is now and then say temp result so I&#8217;m just gonna print what the</p>



<p>temp result actually was and I could print something about I just multiplied</p>



<p>thing about I just multiplied the input by two and then you know the more</p>



<p>complicated your expression is the more temporary variables you want to use and</p>



<p>just kind of print every single one of them and print you know this new</p>



<p>variable is the result of dividing by two this new variable is the result of</p>



<p>calling some other function and so forth</p>



<p>so then we have like a basically you know basically a pretty good idea maybe</p>



<p>at the end though instead of multiplying by two again you want to make it more</p>



<p>want to make it more consistent with your debug output so like here temp result is obviously going</p>



<p>to be the result that i return why would you do the expression all over again for the return part</p>



<p>when you could easily get it wrong why not instead just return the temp result that you made right so</p>



<p>then that way your output completely matches what you&#8217;re actually returning and for now i think</p>



<p>that&#8217;s all we need to do let me run it one more time and then you&#8217;ll see a bunch of stuff now uh</p>



<p>Now, we have a lot of information that we can use to trace how our program was thinking and hopefully find the problem.</p>



<p>But isn&#8217;t this like a little bit starting to get a little bit hard to read, right?</p>



<p>You can see that there are kind of blocks happening whenever we iterate.</p>



<p>So, you know, for me, I always try to keep in mind you need all the brainpower you can get.</p>



<p>Why not just format it a little bit better so it&#8217;s really easy to just quickly look at one block and see, you know,</p>



<p>the couts kind of like belong together so i&#8217;m just going to add one more cout in the main for loop</p>



<p>here just at the very bottom i&#8217;m going to go couts and l just so that i get a new line and if i run</p>



<p>the program again notice how it&#8217;s easier to see the blocks like oh that&#8217;s clearly one iteration</p>



<p>right here you know your mind just grabs onto it faster and that increases your brain power and</p>



<p>makes it easier to debug and read the debug output so i can go all right all right okay so</p>



<p>all right okay so we&#8217;re right up here oh around uh iteration um number 83 uh a was this number</p>



<p>and then it got increased by uh this other number and the reason that that happened is because the</p>



<p>function returned 172 so it basically increased it by 172 and then it ended up being that number</p>



<p>oh okay i think i see what went wrong oh no right in this particular program if we scroll up just a</p>



<p>little bit we can probably see that the integer is overflowing right the integer was getting bigger</p>



<p>right the integer was getting bigger and bigger and bigger here and then eventually</p>



<p>it jumped into the negative at some point so right here we can see oh okay when did this</p>



<p>number become negative suppose we didn&#8217;t want it to be negative um what was this this is like</p>



<p>a million this is a billion no wait wait wait this is uh no that&#8217;s a million right there so it&#8217;s like</p>



<p>299 million and then it overflowed oh no no it didn&#8217;t it didn&#8217;t overflow it started at 299</p>



<p>it started at 299 then at the bottom it was sitting at 899 million that&#8217;s kind of close to a billion</p>



<p>and it did jump up from 300 million to 900 million so that&#8217;s a jump up of like 600 million</p>



<p>oh you know it&#8217;s like kind of jumping up faster with each iteration oh and i&#8217;m using a 32-bit</p>



<p>signed integer which has a maximum value of around 2 billion so now i could possibly realize at this</p>



<p>the number is just like it became too big and I need to change my data type or I need to change</p>



<p>my algorithm for some reason right so you can kind of get to the bottom of things pretty quickly</p>



<p>so here&#8217;s another problem that people encounter when they&#8217;re using caveman debugging</p>



<p>basically you you add all these cout statements or print statements or whatever you&#8217;re doing in</p>



<p>whatever language you have and then when you&#8217;re finished you&#8217;re kind of like well I guess uh</p>



<p>I need to delete all of these Couts because I don&#8217;t want all this you know</p>



<p>Junk being printed in my program after I fix the problem or maybe you&#8217;re trying to debug a different part of your program</p>



<p>So then you start commenting out all the print statements or you start</p>



<p>You know deleting them or whatever and then whoops later on you realize maybe that part of my program</p>



<p>Was not actually fixed and I have to add all the Couts all over again from scratch that costs time</p>



<p>So that&#8217;s not fun. So here&#8217;s a trick that I like to use. It&#8217;s called a short circuit</p>



<p>it&#8217;s called a short circuit it&#8217;s a sort of like a beginning C++ thing or just</p>



<p>when you&#8217;re first learning how to use logical operators for boolean</p>



<p>expressions so I&#8217;m gonna do a boolean and I&#8217;m just gonna name it after what</p>



<p>problem I&#8217;m trying to solve so we could just call this you know main C outs or</p>



<p>something like that let&#8217;s I don&#8217;t know primary problem I&#8217;ll call it primary</p>



<p>the boolean as true because then what will happen is uh we can then short circuit all of the cout</p>



<p>statements we can say primary problem couts and cout like that and the way the short circuit works</p>



<p>works is if you have a logical and expression you can see right here we have two sides</p>



<p>of that statement now one&#8217;s on the left which is just the boolean and one&#8217;s on the right which is</p>



<p>have a logical and then you know one and zero is equal to zero true and false is equal to false so</p>



<p>both things have to be true for the expression to evaluate to true which means if the first thing</p>



<p>is false there&#8217;s no point in even looking at the second thing at all because if i if i set that to</p>



<p>false then the second part the c out is it doesn&#8217;t matter the whole expression is going to evaluate</p>



<p>to false anyway so uh the logical operator itself will just you know block out the rest of the</p>



<p>you know, block out the rest of the statement.</p>



<p>That&#8217;s called a short circuit.</p>



<p>So I&#8217;m going to copy the short circuiting to all of my C out statements like this.</p>



<p>Okay.</p>



<p>And do that.</p>



<p>And then the C out there.</p>



<p>And I guess I&#8217;ll leave the final result there.</p>



<p>And for the moment, you know, this is just a regular function.</p>



<p>apply the short circuiting to this other f unless I do a separate boolean but</p>



<p>keep in mind if this was a class and you had two different methods that you</p>



<p>wanted to short circuit see outs inside of at the same time you could just use a</p>



<p>member variable and name it after the problem you&#8217;re currently trying to solve</p>



<p>and then just short circuit each see out in the appropriate method with that</p>



<p>boolean so I guess in this regular program that doesn&#8217;t have a class I</p>



<p>could move the boolean into the global if I wanted to but I&#8217;m not going to right</p>



<p>if I wanted to, but I&#8217;m not going to right now.</p>



<p>And if you&#8217;re writing assembly or some simpler language</p>



<p>and you&#8217;re thinking, hey, I can&#8217;t short circuit an assembly</p>



<p>or some other language, well, you could write a function</p>



<p>that just takes a couple arguments.</p>



<p>You could write a function that takes a string to print</p>



<p>and maybe a number to print or just, you know,</p>



<p>something simple like that.</p>



<p>And then in the function itself that prints,</p>



<p>you could call it debug print if you want.</p>



<p>Have it look at a global variable or define</p>



<p>that you&#8217;ve set up at the top of the assembly module.</p>



<p>set up at the top of the assembly module, which you can just turn on and off,</p>



<p>like just do a data byte and set it to a zero or set it to a one.</p>



<p>And then the function debug print will just look at that variable to decide</p>



<p>whether or not it&#8217;s going to actually print or not.</p>



<p>So, you know, it&#8217;s a little more complicated in assembly,</p>



<p>but you can do it basically the same concept.</p>



<p>Let&#8217;s run this again just to make sure it still works.</p>



<p>Okay, so it still works.</p>



<p>So now suppose I want to turn off all the Cout statements.</p>



<p>If I just change the true to false,</p>



<p>the true to false notice how it&#8217;s all gone except for the stuff inside of f which i told you i</p>



<p>wasn&#8217;t going to touch but notice how easy it was to mute it and then if i want to bring it back</p>



<p>later i just go true to unmute it of course if you want to do a little bit more typing you can</p>



<p>also do if statements like if this condition is true and that condition is true then print the</p>



<p>debug statement so then you can have a more complicated way of muting and not muting but</p>



<p>I&#8217;m going to leave it as is right now.</p>



<p>Let&#8217;s see, what else do we got here?</p>



<p>I think actually at this point, this is the basic idea of caveman debugging.</p>



<p>Just basically print everything.</p>



<p>Print all of your decision points.</p>



<p>Use pretty labels that are really, really easy for you to understand.</p>



<p>Use formatting so that your brain doesn&#8217;t have to struggle to understand what you&#8217;re seeing.</p>



<p>If you just print a bunch of numbers, you&#8217;re going to be shooting yourself in the foot.</p>



<p>you&#8217;re going to be shooting yourself in the foot and use short circuiting or if statements to</p>



<p>selectively mute them so you can do less typing and and debugging the debugging and so forth but</p>



<p>yeah i think i think this is all i really wanted to show you in this particular video</p>



<p>i hope you feel like an expert in caveman debugging i certainly am and it you know it</p>



<p>kind of fits my personality a little bit i&#8217;m like what&#8217;s going on um and like i said before</p>



<p>debugger it&#8217;s probably a better idea but I usually don&#8217;t unless I&#8217;m in big trouble</p>



<p>and I have a huge mess on my hands I usually just go directly to caveman</p>



<p>debugging we&#8217;ll look at the same piece of code in my next video that I&#8217;m going</p>



<p>to publish which is going to talk about using a proper debugger so watch the</p>



<p>next one also but for now I hope you&#8217;ve enjoyed this video thank you for</p>



<p>watching I hope you learned a little bit and had a little bit of fun see you in</p>



<p>video</p>



<p>whoops what the heck</p>



<p>hey everybody thanks for watching this video again from the bottom of my heart</p>



<p>i really appreciate it i do hope you did learn something and have</p>



<p>some fun uh if you could do me a please a small little favor could you please</p>



<p>subscribe and follow this channel or these videos</p>



<p>or whatever it is you do on the current social media website that you&#8217;re looking</p>



<p>at right now it would really mean the world to me and</p>



<p>more videos and grow this community so we&#8217;ll be able to do more videos longer</p>



<p>videos better videos or just I&#8217;ll be able to keep making videos in general so</p>



<p>please do do me a kindness and and subscribe you know sometimes I&#8217;m</p>



<p>sleeping in the middle of the night and I just wake up because I know somebody</p>



<p>subscribed or followed it just wakes me up and I get filled with joy that&#8217;s</p>



<p>exactly what happens every single time so you could do it as a nice favor to me</p>



<p>or you could you control me if you want to just wake me up in the middle of the</p>



<p>and then i&#8217;ll i&#8217;ll just wake up i promise that&#8217;s what will happen also uh if you look at the middle</p>



<p>of the screen right now you should see a qr code which you can scan in order to go to the website</p>



<p>which i think is also named somewhere at the bottom of this video and it&#8217;ll take you to my</p>



<p>main website where you can just kind of like see all the videos i published and the services and</p>



<p>tutorials and things that i offer and all that good stuff and uh if you have a suggestion for</p>



<p>clarifications or errata or just future videos that you want to see please leave a comment or</p>



<p>if you just want to say hey what&#8217;s up what&#8217;s going on you know just send me a comment whatever i also</p>



<p>wake up for those in the middle of the night i get i wake up in a cold sweat and i&#8217;m like</p>



<p>it would really it really mean the world to me i would really appreciate it so again thank you so</p>



<p>much for watching this video and um enjoy the cool music as as i fade into the darkness which is</p>



<p>us all.</p>



<p>Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/caveman-debugging-simple-trick-to-debug-c-code-like-a-pro/">Caveman Debugging: Simple Trick to Debug C++ Code Like a Pro!</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/caveman-debugging-simple-trick-to-debug-c-code-like-a-pro/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained</title>
		<link>https://www.NeuralLantern.com/master-data-sizes-in-x86-64-cpus-bytes-words-d-words-and-quad-words-explained/</link>
					<comments>https://www.NeuralLantern.com/master-data-sizes-in-x86-64-cpus-bytes-words-d-words-and-quad-words-explained/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Mon, 09 Jun 2025 00:07:07 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[64-bit computing]]></category>
		<category><![CDATA[assembly language]]></category>
		<category><![CDATA[bytes]]></category>
		<category><![CDATA[coding tutorial]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[CPU basics]]></category>
		<category><![CDATA[CPU registers]]></category>
		<category><![CDATA[D word]]></category>
		<category><![CDATA[data sizes]]></category>
		<category><![CDATA[low-level programming]]></category>
		<category><![CDATA[programming for beginners]]></category>
		<category><![CDATA[quad word]]></category>
		<category><![CDATA[tech education]]></category>
		<category><![CDATA[words]]></category>
		<category><![CDATA[x86-64]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=148</guid>

					<description><![CDATA[<p>Learn data sizes in x86-64 CPUs: bytes, words, D words, quad words. Clear guide for coders on assembly &#038; registers. Subscribe for more!</p>
<p>The post <a href="https://www.NeuralLantern.com/master-data-sizes-in-x86-64-cpus-bytes-words-d-words-and-quad-words-explained/">Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained" width="1380" height="776" src="https://www.youtube.com/embed/v3fMANsXIwU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Get a clear, fun breakdown of data sizes in x86-64 CPUs! This video covers bytes (8 bits), words (16 bits), D words (32 bits), and quad words (64 bits), plus how they fit into assembly and CPU registers. Perfect for programmers, students, or anyone curious about low-level computing. I’ll walk you through the basics with relatable examples, no jargon overload. Subscribe for more coding &amp; tech videos, and scan the QR code to visit my site for extra tutorials! Leave a comment with your thoughts!</p>



<p>Introduction 00:00:00<br>Data Sizes Overview 00:00:01<br>Byte Definition 00:00:44<br>Bits to Bytes Conversion 00:01:27<br>Word Size Explanation 00:02:20<br>Double Word (D Word) 00:04:03<br>Quad Word Definition 00:04:44<br>CPU Registers and Memory 00:05:21<br>Conclusion and Outro 00:06:07<br>Call to Action 00:06:32</p>



<p>Thanks for watching!</p>



<p>Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>
</ul>



<p>Please help support us!</p>



<ul class="wp-block-list">
<li>Subscribing + Sharing on Social Media</li>



<li>Leaving a comment or suggestion</li>



<li>Subscribing to our Blog</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p>Hello there.</p>



<p>I&#8217;d like to talk to you about data sizes within the context of x86,</p>



<p>64 CPUs,</p>



<p>just like 64 bit CPUs for assembly and just whatever.</p>



<p>So what&#8217;s going on inside of the machine and how do we describe the sizes of</p>



<p>various clumps of data? So for starters, you know,</p>



<p>of your computer, there&#8217;s just a bunch of ones and zeros represented in all the wires,</p>



<p>in all the circuitry.</p>



<p>The human beings with feelings decide, oh, you know, I&#8217;m going to take a group of this</p>



<p>many bits, this many ones and zeros, and I&#8217;m going to say that it is something else.</p>



<p>I&#8217;m going to call it an abstract unit.</p>



<p>So the first thing that we do is we have something called a byte.</p>



<p>That just means eight bits.</p>



<p>So we can say one byte equals eight bits.</p>



<p>equals eight bits. I don&#8217;t know why I hit the shift key there. That&#8217;s probably going to mess</p>



<p>up my annotator. Nope. Okay. So what is eight bits? Just as a little reminder, you know, we&#8217;ll</p>



<p>just say one, two, three, four, five, six, seven, eight, or it could be, you know, something more</p>



<p>random looking one, two, three, four, five, six, seven, eight, you know, so like inside of the</p>



<p>machine, we have eight ones and zeros for eight bits. And when we group them together, we&#8217;ll just</p>



<p>Okay, no problem.</p>



<p>So that means by the way, if somebody says,</p>



<p>oh, my internet connection is this many megabits a second.</p>



<p>If you wanna know how many bytes a second,</p>



<p>try dividing by eight.</p>



<p>Or if somebody says I have this many megabytes a second</p>



<p>of transfer speed, try dividing that by eight.</p>



<p>You know, so multiply or divide by eight</p>



<p>to get the right number.</p>



<p>Okay, so if we had two bytes together,</p>



<p>that&#8217;s just gonna be 16 bits.</p>



<p>No problem there.</p>



<p>I&#8217;m just going to copy paste these bits and you don&#8217;t have to do this.</p>



<p>But for me personally, I like to put a little space in between bite groupings just to help</p>



<p>my human brain kind of see, oh, I&#8217;m looking at two bites right here when I&#8217;m referring</p>



<p>to different data sizes.</p>



<p>So then eventually we kind of need an idea of, you know, let&#8217;s come up with a different</p>



<p>word that means more than one bite.</p>



<p>ironically based on what I just said the the term we&#8217;re going to use is word a word</p>



<p>the size of a word just kind of depends on the system that you&#8217;re on on my system</p>



<p>the size of a word is two bytes so I&#8217;m going to say one word equals two bytes</p>



<p>and you can imagine that&#8217;s 16 bits maybe I should start doing the double equal sign here just to be</p>



<p>Okay, so equals two bytes.</p>



<p>It also equals 16 bits.</p>



<p>And you can imagine it&#8217;s basically the same thing</p>



<p>that we just wrote up above.</p>



<p>So I&#8217;m gonna erase this actually, 16.</p>



<p>Oh, I put an E there, embarrassing.</p>



<p>Okay, so one word is two bytes.</p>



<p>Again, the size of a word depends on your system.</p>



<p>If you&#8217;re not sure, you should probably look it up.</p>



<p>What&#8217;s the word size on my system?</p>



<p>But again, the typical system here in 2024</p>



<p>6664 machines running Ubuntu, um, or just like Linux is going to be like, you know,</p>



<p>two bytes. Okay. So now, uh, we have like words that we can do. So if I had, uh,</p>



<p>let&#8217;s say I had two words, uh, two words is going to be double of what we just wrote. Right. So</p>



<p>that means we&#8217;re going to have this many, whoops, I blew it. We&#8217;re going to have this many bits.</p>



<p>So two words, two words is going to be equal to, um, 32 bits.</p>



<p>And it&#8217;s also going to be equal to four bytes because, you know, we multiplied everything</p>



<p>by two.</p>



<p>So this is like four bytes.</p>



<p>So now we need another term to represent this two words, which is four bytes, which</p>



<p>is 32 bits.</p>



<p>We can also call that a D word.</p>



<p>Actually, I&#8217;ll say D word like that.</p>



<p>And what does D word mean?</p>



<p>is twice the size of the word length on your system.</p>



<p>So like if we decided our word length is two bytes,</p>



<p>then a D word is four bytes and that&#8217;s it.</p>



<p>Four bytes is 32 bits.</p>



<p>You might notice this is similar to like old school CPUs</p>



<p>that ran in 32 bits and maxed out their RAM</p>



<p>at about four gigabytes.</p>



<p>So let&#8217;s come up with one more term here.</p>



<p>Let&#8217;s come up with the term quad word.</p>



<p>Actually, we&#8217;re not coming up with the term.</p>



<p>We&#8217;re just using it.</p>



<p>What is a quad word?</p>



<p>A quad word is two D words.</p>



<p>So we&#8217;re just kind of doubling it again.</p>



<p>I forgot that extra equal sign there.</p>



<p>Quad word is two D words, which means it&#8217;s also four words.</p>



<p>And it also means it&#8217;s eight bytes.</p>



<p>64 bits.</p>



<p>And then I guess if I want to represent this to you,</p>



<p>I can just kind of like copy paste that twice.</p>



<p>And this is the size of the memory address space that we have on modern CPUs.</p>



<p>This is also the size of your general purpose registers in modern 64-bit CPUs.</p>



<p>So if somebody says, hey, I got a quad word.</p>



<p>I want you to store it somewhere.</p>



<p>You can instantly think to yourself, well, obviously I could put it in memory.</p>



<p>I could put it in memory.</p>



<p>You could also just put it directly into a CPU register.</p>



<p>And that&#8217;s it.</p>



<p>This also means that you could put two D words into one CPU register if you were very clever.</p>



<p>You could also do the same thing.</p>



<p>You could put like four words inside of one CPU register.</p>



<p>Because the CPU registers, they&#8217;re always the same size no matter how you use them.</p>



<p>They&#8217;re kind of hardwired.</p>



<p>So I hope this has been, you know, kind of helpful.</p>



<p>These are the basics of different data type sizes that we have in CPUs and</p>



<p>assembly language. I&#8217;ll see you in the next video.</p>



<p>Hey everybody. Thanks for watching this video again from the bottom of my heart.</p>



<p>I really appreciate it. I do hope you did learn something and have some fun.</p>



<p>If you could do me a please, a small little favor,</p>



<p>Follow this channel or these videos or whatever it is you do on the current social media website that you&#8217;re looking at right now</p>



<p>It would really mean the world to me and it&#8217;ll help make more videos and grow this community</p>



<p>So we&#8217;ll be able to do more videos longer videos better videos or just I&#8217;ll be able to keep making videos in general</p>



<p>So, please do do me a kindness and and subscribe</p>



<p>You know sometimes I&#8217;m sleeping in the middle of the night and I just wake up because I know somebody subscribed or followed</p>



<p>and I get filled with joy. That&#8217;s exactly what happens every single time. So you could do it as</p>



<p>a nice favor to me, or you could, you could troll me if you want to just wake me up in the middle</p>



<p>of the night, just subscribe. And then I&#8217;ll, I&#8217;ll just wake up. I promise that&#8217;s what will happen.</p>



<p>Also, uh, if you look at the middle of the screen right now, you should see a QR code,</p>



<p>which you can scan in order to go to the website, which I think is also named somewhere at the</p>



<p>bottom of this video. And it&#8217;ll take you to my main website where you can just kind of like see</p>



<p>and tutorials and things that I offer and all that good stuff and if you have a suggestion for</p>



<p>clarifications or errata or just future videos that you want to see please leave a comment or</p>



<p>if you just want to say hey what&#8217;s up what&#8217;s going on you know just send me a comment whatever I also</p>



<p>wake up for those in the middle of the night I get I wake up in a cold sweat and I&#8217;m like this</p>



<p>it would really it really mean the world to me I would really appreciate it so again thank you so</p>



<p>thank you so much for watching this video and enjoy the cool music as as i fade into the</p>



<p>darkness which is coming for us all</p>



<p>Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/master-data-sizes-in-x86-64-cpus-bytes-words-d-words-and-quad-words-explained/">Master Data Sizes in x86-64 CPUs: Bytes, Words, D Words, and Quad Words Explained</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/master-data-sizes-in-x86-64-cpus-bytes-words-d-words-and-quad-words-explained/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Binary to Hex Conversion Made EASY! No Math Needed!</title>
		<link>https://www.NeuralLantern.com/binary-to-hex-conversion-made-easy-no-math-needed/</link>
					<comments>https://www.NeuralLantern.com/binary-to-hex-conversion-made-easy-no-math-needed/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Fri, 02 May 2025 09:21:04 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Conversions]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[binary conversion]]></category>
		<category><![CDATA[binary numbers]]></category>
		<category><![CDATA[binary to hex conversion]]></category>
		<category><![CDATA[coding tutorials]]></category>
		<category><![CDATA[computer basics]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[hex conversion]]></category>
		<category><![CDATA[hexadecimal]]></category>
		<category><![CDATA[hexadecimal numbers]]></category>
		<category><![CDATA[learn programming]]></category>
		<category><![CDATA[number systems]]></category>
		<category><![CDATA[programming for beginners]]></category>
		<category><![CDATA[tech tutorials]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=93</guid>

					<description><![CDATA[<p>Learn binary to hex conversion without math! Simple patterns for computer science students. Watch now for easy tips! #Binary #Hex</p>
<p>The post <a href="https://www.NeuralLantern.com/binary-to-hex-conversion-made-easy-no-math-needed/">Binary to Hex Conversion Made EASY! No Math Needed!</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Binary to Hex Conversion Made EASY! No Math Needed!" width="1380" height="776" src="https://www.youtube.com/embed/9hrPr95c8JA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Hey there! Struggling with binary to hex conversions? This video makes it SUPER easy—no math required! Learn to convert between binary and hexadecimal with simple patterns you’ll memorize in no time. Perfect for computer science students, coders, or anyone curious about how computers work. Subscribe for more tutorials, and scan the QR code to visit my site for extra resources. Drop a comment with your questions or video ideas! #Binary #Hex #ComputerScience #Coding</p>



<p>Introduction to Binary and Hex Conversion 00:00:00<br>Why Convert Between Binary and Hex 00:00:13<br>Recap of Number Systems 00:00:41<br>Binary Base Two System 00:01:01<br>Hexadecimal Base Sixteen System 00:01:24<br>Benefits of Hexadecimal 00:02:06<br>Simplifying Binary-Hex Conversion 00:03:04<br>Four Bits Equal One Hex Digit 00:04:32<br>Memorizing Binary-Hex Patterns 00:05:13<br>Creating a Binary-Hex Conversion Table 00:06:26<br>Converting Hex to Binary Example 00:08:52<br>Understanding Nibbles and Bytes 00:10:44<br>Converting Binary to Hex Example 00:13:19<br>Conclusion and Verification 00:15:38<br>Call to Subscribe and Engage 00:16:20</p>



<p>Thanks for watching!</p>



<p>Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>
</ul>



<p>Please help support us!</p>



<ul class="wp-block-list">
<li>Subscribing + Sharing on Social Media</li>



<li>Leaving a comment or suggestion</li>



<li>Subscribing to our Blog</li>



<li>Watching the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p>Hi there! Let&#8217;s talk about converting back and forth between binary and hexadecimal.</p>



<p>Why would you want to do that? Well, maybe you&#8217;re in computer science. Maybe you&#8217;ve been presented</p>



<p>with some numbers that you need to convert. Maybe you have like a bunch of ones and zeros.</p>



<p>Maybe you have like an ox and then something that looks really weird. It&#8217;s got some letters in it,</p>



<p>but it&#8217;s also got some numbers. And you&#8217;re trying to figure out what are these? What are we trying</p>



<p>we try to convert back and forth between.</p>



<p>You should have watched my other videos by now,</p>



<p>which will teach you how to convert back and forth</p>



<p>between both of these number bases and decimal.</p>



<p>So you can understand what they are</p>



<p>in just normal human terms.</p>



<p>But as a quick recap, decimal is a base 10 number system</p>



<p>because we have 10 possible characters that we can use.</p>



<p>We can say zero, one, two, three, four,</p>



<p>five, six, seven, eight, nine.</p>



<p>So that&#8217;s 10 total characters, zero through nine.</p>



<p>We also have binary, which is what computers use, which is a base two system.</p>



<p>It&#8217;s base two because the only characters you have available are just zero and one.</p>



<p>So base two, two characters.</p>



<p>You can represent a number between zero and one in a single digit.</p>



<p>Then we have hexadecimal, which is a way to represent a number in a more compact way.</p>



<p>system there because we have 16 possible characters we have 0 1 2 3 4 5 6 7 8 9</p>



<p>just like decimal but then we add more numbers we had like six numbers we say</p>



<p>a b c d e f and what happens is the a has a strength of 10 whereas the you know</p>



<p>the 9 just to its left had a strength of 9 the a has a strength of 10 the b has a</p>



<p>of 11 the c has a strength of 12 and the d has a strength of 13 and the e has a strength of 14</p>



<p>and the f has a strength of 15 and so you know we just have more characters that we can use in one</p>



<p>single digit which means we can rent we can represent the same number in decimal but just</p>



<p>we can represent it smaller if we use hexadecimal so it&#8217;s kind of useful when you&#8217;re working with</p>



<p>looking at bits in binary or hex and not necessarily decimal because binary as</p>



<p>you&#8217;re going to learn in this video gives you kind of a good idea just by</p>



<p>looking at it after you&#8217;ve practiced a little while gives you a good idea of</p>



<p>what hex numbers you would be seeing if you were looking at the same number and</p>



<p>vice versa if you&#8217;re looking at hex numbers if you look at them a lot in</p>



<p>your daily life you&#8217;ll start to kind of like see through the matrix and you&#8217;ll</p>



<p>And if you&#8217;re interested in finding what bits are on and off,</p>



<p>it&#8217;s convenient to be able to look at a hexadecimal number</p>



<p>and kind of intuitively know,</p>



<p>okay, those bits are probably like on and off.</p>



<p>Those bits are all on, you know, whatever.</p>



<p>So this is the basics of number basis.</p>



<p>Here&#8217;s a trick.</p>



<p>In all my other videos,</p>



<p>when we converted back and forth</p>



<p>between decimal and binary and hex and all that stuff,</p>



<p>we used multiplication, we used division,</p>



<p>you know, we messed with the numbers quite a bit.</p>



<p>the great thing about binary and hex conversions is you don&#8217;t even really need to do math.</p>



<p>Maybe a little math at first while you&#8217;re learning, but eventually when you get used to it,</p>



<p>you start to realize you can memorize short patterns. Let me bring your attention to the</p>



<p>fact that in hexadecimal, you have 16 possible combinations, or you can represent a number</p>



<p>you can do the same thing in four characters if I had four characters right</p>



<p>here in binary very quickly you could do the calculation in your head if you&#8217;ve</p>



<p>watched my other videos you can see well that one counts for a one and this one</p>



<p>counts for a two and this one counts for a four and this one counts for an eight</p>



<p>if I want to know what the maximum value is that I could represent with four</p>



<p>digits I just take the the top numbers strength multiply it by two and then</p>



<p>strength multiply it by 2 and then subtract 1. So if we have 1, 2, 4, 8, I&#8217;ll just multiply 8 by 2,</p>



<p>that&#8217;s 16, and then subtract 1, that&#8217;s 15. So I can represent a number between 0 and 15 with 4</p>



<p>binary digits. But I just said you could do that with one hexadecimal digit, right?</p>



<p>So that means one hexadecimal digit is actually four binary digits. And if you just memorize</p>



<p>16 combinations of numbers, which is not like that hard.</p>



<p>And even if you don&#8217;t memorize them all,</p>



<p>I don&#8217;t have them all memorized.</p>



<p>It&#8217;s really easy to convert in your head</p>



<p>a four digit binary number to decimal</p>



<p>and then convert that back to hexadecimal pretty fast,</p>



<p>hexadecimal.</p>



<p>So what&#8217;s the equivalent of 1111?</p>



<p>Well, we know it&#8217;s the highest possible value</p>



<p>with just one hexadecimal digit.</p>



<p>So that would have to be an F.</p>



<p>So you can memorize already</p>



<p>You can memorize already a couple of really, really easy combinations.</p>



<p>We could say, let me say zero binary, OB to say that we&#8217;re looking at binary is equal</p>



<p>to zero X F. So just the letter F in hex.</p>



<p>Remember that we like to prefix different base number systems to give the reader a reminder</p>



<p>of what base they&#8217;re looking at.</p>



<p>one i&#8217;m going to say that 000 in binary is just zero in hex if i didn&#8217;t put that prefix how would</p>



<p>you know if you&#8217;re looking at hex or binary or decimal it would be even more confusing if you</p>



<p>had like you know one two zero is that hex one two zero or is that uh decimal one two zero i guess it</p>



<p>can&#8217;t be binary one two zero but if we did one one zero now it could be binary or hex or decimal so</p>



<p>i&#8217;m just going to put uh zero b for binary and i&#8217;m going to say it&#8217;s zero so that&#8217;s two of the</p>



<p>of the 16 total possible combinations that we would memorize.</p>



<p>So let&#8217;s iterate through all the combinations.</p>



<p>Just for the sake of making this table more compact,</p>



<p>actually, let me start a new little notepad page here.</p>



<p>I&#8217;m going to omit those prefixes because those are a good idea,</p>



<p>but while we&#8217;re doing our lookups, they&#8217;re a little irritating.</p>



<p>So I&#8217;m going to take them out.</p>



<p>So I&#8217;m going to say 0001.</p>



<p>Let me say this.</p>



<p>So I&#8217;m just going to count from 0 to 15 in binary.</p>



<p>to 15 in binary.</p>



<p>So this is going to be one, one,</p>



<p>and then zero and then zero, one, zero, one, zero, one,</p>



<p>I don&#8217;t know, that&#8217;s a lot of copy pasting.</p>



<p>Let me just double check here that I&#8217;m doing this right.</p>



<p>I should have 16 lines.</p>



<p>I don&#8217;t, so I&#8217;ve done something wrong.</p>



<p>Let&#8217;s see.</p>



<p>So this is like 0, 1, 2, 3, and this is 4.</p>



<p>This is 5, and then 6, and then 7, and this is 8.</p>



<p>Oh, I have that twice.</p>



<p>Okay, 8.</p>



<p>And then since I copy pasted the bottom part,</p>



<p>I think I can probably assume that&#8217;s okay.</p>



<p>One, two, three, four, five, six, seven.</p>



<p>That was kind of spooky.</p>



<p>I guess a lesson learned is that relying on a battery pack</p>



<p>or a light that&#8217;s gonna stay on for many hours</p>



<p>is probably a dumb idea.</p>



<p>Anyway, continuing, we have this table here.</p>



<p>We have like 16 possible combinations.</p>



<p>So now I&#8217;m gonna map these to hexadecimal digits.</p>



<p>uh you know like 10 are going to be really easy right it&#8217;s just going to be zero and then one</p>



<p>and then two you can make a vertical table if you want for yourself I&#8217;m just doing it this way</p>



<p>because it&#8217;s easier the way that I&#8217;m typing in this notepad the way that I&#8217;m typing in this</p>



<p>notepad so I&#8217;m going to do seven eight nine and then when we get to 10 let me just double check</p>



<ol start="10" class="wp-block-list">
<li>So this is eight plus two. So that means this is indeed a 10 and oh, 10 in hex, not a decimal.</li>
</ol>



<p>So that&#8217;s a and then B and then C and then D and then E and then F. Okay. So now that we have this</p>



<p>little table set up, you know, if you want to write it horizontally, that&#8217;s fine. It&#8217;s actually</p>



<p>binary and hex now imagine we have a gigantic hex number zero x and then i&#8217;m just going to do like a</p>



<p>bunch of numbers and then i&#8217;m going to do change some of these to like letters just to make things</p>



<p>more interesting a b c d e did i use any d e f e b i didn&#8217;t use a b oh there we go and i&#8217;ll put like</p>



<p>another aid in there okay so this is huge and this would take like a while to calculate right</p>



<p>to calculate right if you were going to convert it to decimal for hex to binary conversion it&#8217;s</p>



<p>actually pretty easy you literally just go b what is b b is that so b is just that you don&#8217;t even</p>



<p>have to do any math let me copy paste this down here so i can show you a really easy way to do</p>



<p>D is this right here.</p>



<p>So I&#8217;m going to say the D is that.</p>



<p>And then the 6 is that pattern right there.</p>



<p>So move you over.</p>



<p>1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4.</p>



<p>Maybe that&#8217;ll line up later, hopefully.</p>



<p>So the 1 is pretty easy.</p>



<p>Probably didn&#8217;t even need to copy-paste that.</p>



<p>I could have just looked at it and typed.</p>



<p>looked at it and typed the E is going to be that and the seven is going to be that</p>



<p>and the two is going to be this eight see what I&#8217;m doing I&#8217;m literally just</p>



<p>copy pasting the bit patterns if you don&#8217;t have copy paste when you&#8217;re doing your conversion</p>



<p>that&#8217;s okay you can at least write down zeros and ones really fast if it&#8217;s just</p>



<p>you know four at a time I should also point out that um you know this is pretty important to</p>



<p>good term that people like to use. Four bytes or one hexadecimal digit, it&#8217;s called a nibble.</p>



<p>So usually you&#8217;re used to seeing eight bytes in a row and you call that, sorry,</p>



<p>usually you&#8217;re used to seeing eight bits in a row and you call that a byte or two hex digits in a</p>



<p>row and you call that a byte. If you just see four bits or one hex digit, that&#8217;s a nibble.</p>



<p>Two nibbles make a byte. Try to remember that. So we have this giant thing here.</p>



<p>we have literally now successfully converted binary.</p>



<p>I&#8217;m going to put, I&#8217;m just going to put OB here</p>



<p>and then remove all the spaces.</p>



<p>This is the binary number that we originally had</p>



<p>in hexadecimal.</p>



<p>So again, just to emphasize, these are the two same numbers.</p>



<p>They&#8217;re just represented differently.</p>



<p>Differently.</p>



<p>Let me punch this into my personal calculator</p>



<p>to make sure that I gave you the right walkthrough</p>



<p>so I don&#8217;t have to correct in a video later.</p>



<p>so expression X result binary oh god I can&#8217;t even I can&#8217;t even read that okay</p>



<p>so let me let me do it backwards I&#8217;m gonna copy paste this one in there okay</p>



<p>so let&#8217;s see X okay so it&#8217;s telling me that supposed to get to B and then a D6</p>



<p>728fac. Okay, so I did it. And this is also a good reminder that you kind of want to pair off</p>



<p>into groups of one byte at least. So, you know, each two characters, that&#8217;s one byte. One character</p>



<p>by itself is a nibble. So you want to pair off into bytes. And notice how this b is all by itself.</p>



<p>So you want to pad to the left with a zero so that you&#8217;re just kind of working with bytes.</p>



<p>It&#8217;s easier on the eyes and the brain. And you&#8217;ll usually see something like this</p>



<p>output from a program or something. In fact, you might see something like this representing,</p>



<p>here&#8217;s a word, or you might see something like this showing that this is like a D word or,</p>



<p>you know, like a 32 bit number. And if we wanted to say, oh, this is a 64 bit system. So let&#8217;s</p>



<p>look at 64 bits. Let&#8217;s look at eight bytes. Then we&#8217;ll just like pad it with, let&#8217;s see, one, two,</p>



<p>that&#8217;s one, two, three, we&#8217;ll pad it with a bunch more zeros. One, two, three, four, five, six,</p>



<p>So this is a proper 64-bit number or an 8-byte number that works with modern systems,</p>



<p>whether you have the space in there or not.</p>



<p>And so I&#8217;m not going to do another example from hex to binary.</p>



<p>Let&#8217;s do a quick example from binary to hex.</p>



<p>It should be just as easy.</p>



<p>So I&#8217;m going to start a new tab here and just copy-paste the table that I made.</p>



<p>Let&#8217;s make a bunch of random numbers for binary.</p>



<p>And so now we&#8217;ve got like a bunch of numbers.</p>



<p>All we have to do is I&#8217;m going to copy paste this so I don&#8217;t ruin the original thing that</p>



<p>I wrote down.</p>



<p>And I&#8217;m just going to break it up into groups of four, starting from the least powerful</p>



<p>digits, you know, like all the way on the right.</p>



<p>So I&#8217;m going to go doop, doop.</p>



<p>Okay.</p>



<p>So after breaking it into groups of four, you can see that the, you know, the most powerful</p>



<p>digit there is a one all by its lonesome.</p>



<p>I could put 000 to make sure that they&#8217;re all groups of four bits. I don&#8217;t really have to because</p>



<p>I could still kind of understand just by looking at the one that it&#8217;s going to end up being a one</p>



<p>and then literally just translate it the same way I did before. Okay that&#8217;s a 1.</p>



<p>1 0 1 0 that&#8217;s an A. What&#8217;s a thousand and one? It is a nine. What&#8217;s a 0 100?</p>



<p>what&#8217;s one oh one oh a what&#8217;s a thousand and one didn&#8217;t i just do that that&#8217;s a nine</p>



<p>what&#8217;s a zero zero oh ten that&#8217;s going to be a two for sure yeah two i finally got one off the</p>



<p>top of my head one zero one one that&#8217;s a b and then uh basically 15 minus eight i don&#8217;t really</p>



<p>want to work that out of my head right now so i&#8217;m gonna look at the table seven okay i guess i</p>



<p>should have done that easy right like how fast was that so i&#8217;m just going to copy paste these</p>



<p>put an ox in front of it and maybe bunch them into groups of two first to see what&#8217;s up</p>



<p>okay so they&#8217;re not in groups of two that means this one is kind of i should have started grouping</p>



<p>them on the right side kind of messed it up someone just you know rearrange the grouping</p>



<p>Let me punch this into my personal calculator to make sure that I got this right. Actually, let me do this original number here</p>



<p>I must say</p>



<p>This binary number is supposed to be</p>



<p>1 a 9 4 a 9 2 b 7. Okay, we did it</p>



<p>Really easy, right? So every time you have to convert back and forth between binary and hex</p>



<p>It&#8217;s your lucky day because that&#8217;s like one of the easiest conversions you could do</p>



<p>Thanks for watching this video. I hope you learned a little bit of stuff and had some fun</p>



<p>I&#8217;ll see you in the next video.</p>



<p>So we&#8217;ll be able to do more videos longer videos better videos or just I&#8217;ll be able to keep making videos in general</p>



<p>So please do do me a kindness and and subscribe</p>



<p>You know sometimes I&#8217;m sleeping in the middle of the night</p>



<p>And I just wake up because I know somebody subscribed or followed it just wakes me up and I get filled with joy</p>



<p>That&#8217;s exactly what happens every single time</p>



<p>So you could do it as a nice favor to me or you could you control me if you want to just wake me up in the middle</p>



<p>And I just subscribe and then I&#8217;ll just wake up. I promise that&#8217;s what will happen</p>



<p>that&#8217;s what will happen also uh if you look at the middle of the screen right now you should see a</p>



<p>qr code which you can scan in order to go to the website which i think is also named somewhere at</p>



<p>the bottom of this video and it&#8217;ll take you to my main website where you can just kind of like see</p>



<p>all the videos i published and the services and tutorials and things that i offer and all that</p>



<p>good stuff and uh if you have a suggestion for uh uh clarifications or errata or just future videos</p>



<p>future videos that you want to see please leave a comment or if you just want to say hey what&#8217;s up</p>



<p>what&#8217;s going on you know just send me a comment whatever i also wake up for those in the middle</p>



<p>of the night i get i wake up in a cold sweat and i&#8217;m like it would really it really mean the world</p>



<p>to me i would really appreciate it so again thank you so much for watching this video and um enjoy</p>



<p>the cool music as as i fade into the darkness which is coming for us all</p>



<p>Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/binary-to-hex-conversion-made-easy-no-math-needed/">Binary to Hex Conversion Made EASY! No Math Needed!</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/binary-to-hex-conversion-made-easy-no-math-needed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
