{"id":9091,"date":"2006-12-14T21:14:00","date_gmt":"2006-12-14T21:14:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/12\/14\/kb-1024-vs-1000\/"},"modified":"2019-02-18T13:21:03","modified_gmt":"2019-02-18T20:21:03","slug":"kb-1024-vs-1000","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/kb-1024-vs-1000\/","title":{"rendered":"KB: 1024 vs 1000"},"content":{"rendered":"<p>I love the fact that we designed PowerShell for Admins and IT Pros and love to demonstrate&nbsp;what that means.&nbsp; Often I&#8217;ll demo PowerShell and show how you can use &#8220;KB&#8221;, &#8220;MB&#8221;, and &#8220;GB&#8221; as I did in my <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2006\/12\/14\/file-aging-script.aspx\">previous blog entry<\/a>:<\/p>\n<p>PS&gt; 1kb<br \/>1024<br \/>PS&gt; 1mb<br \/>1048576<br \/>PS&gt; 1gb<br \/>1073741824<br \/>PS&gt; 1kb+2mb+3gb<br \/>3223323648<\/p>\n<p>Almost uniformly, the crowds LOVE this but every now and a again someone make the point that &#8220;kb&#8221; should be 1000 not 1024.&nbsp; One of our readers (Dan) made this point in comments to the last post and even provided a pointer to a Wikipedia article to back up his position.&nbsp; This is not an unreasonable position but I&#8217;ll make 3 points:<\/p>\n<ol>\n<li>No matter what you pick, some people will like the choice and others will not.<\/li>\n<li>In the context of&nbsp;Admins and IT Pros, KB really does mean 1024 not 1000.&nbsp;&nbsp; (The reaction from my audiences is very consistent about this though they might just be being polite while privately thinking I&#8217;m an idiot \ud83d\ude42 ).<\/li>\n<li>Being the architect of a V1 has its advantages (you get help make these decisions).<\/li>\n<\/ol>\n<p>Now if your head and heart are really into 1000, don&#8217;t despair, PowerShell supports Scientific notion:<\/p>\n<p>PS&gt; 1e3<br \/>1000<br \/>PS&gt; 6e6<br \/>6000000<br \/>PS&gt; 1e100<br \/>1E+100&nbsp;<\/p>\n<p>We also support Hex format<\/p>\n<p>PS&gt; 0xFFFF<br \/>65535<br \/>PS&gt; 0xCAB<br \/>3243<\/p>\n<p>And others.&nbsp; BTW &#8211; All of this is covered by Lee Holmes&#8217;s O&#8217;Reilly Book<a href=\"http:\/\/www.oreilly.com\/catalog\/windowspowershell\/\">Windows PowerShell Quick Reference<\/a>.&nbsp; (Lee is a PowerShell developer and did a great job with this book.)&nbsp; This is the sort of book that you print out and keep next to your keyboard because you are always looking up something.&nbsp;&nbsp;&nbsp; On page 14, Lee shows you how you can convert to any numberbase (binary, octal, etc.)<\/p>\n<p>Enjoy<\/p>\n<p>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love the fact that we designed PowerShell for Admins and IT Pros and love to demonstrate&nbsp;what that means.&nbsp; Often I&#8217;ll demo PowerShell and show how you can use &#8220;KB&#8221;, &#8220;MB&#8221;, and &#8220;GB&#8221; as I did in my previous blog entry: PS&gt; 1kb1024PS&gt; 1mb1048576PS&gt; 1gb1073741824PS&gt; 1kb+2mb+3gb3223323648 Almost uniformly, the crowds LOVE this but every now [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>I love the fact that we designed PowerShell for Admins and IT Pros and love to demonstrate&nbsp;what that means.&nbsp; Often I&#8217;ll demo PowerShell and show how you can use &#8220;KB&#8221;, &#8220;MB&#8221;, and &#8220;GB&#8221; as I did in my previous blog entry: PS&gt; 1kb1024PS&gt; 1mb1048576PS&gt; 1gb1073741824PS&gt; 1kb+2mb+3gb3223323648 Almost uniformly, the crowds LOVE this but every now [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=9091"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9091\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=9091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=9091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=9091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}