deploy: b37daad099d713cc12e460f85efab118dae0c1c6

This commit is contained in:
Aurorxa 2024-07-15 07:38:24 +00:00
parent ec15af63b6
commit 614031447d
13 changed files with 25 additions and 25 deletions

View File

@ -8,7 +8,7 @@
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/c/assets/style.bTUc_nQv.css" as="style">
<script type="module" src="/c/assets/app.DJvpVQC4.js"></script>
<script type="module" src="/c/assets/app.C14JyXvG.js"></script>
<link rel="preload" href="/c/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="shortcut icon" href="/c//logo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,shrink-to-fit=no">
@ -18,7 +18,7 @@
</head>
<body>
<div id="app"></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"uFk6fSzW\",\"notes_index.md\":\"CdHKXnBk\",\"notes_01_c-basic_02_xdx_index.md\":\"CB8oZG6k\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"notes_index.md\":\"CdHKXnBk\",\"index.md\":\"uFk6fSzW\",\"notes_01_c-basic_02_xdx_index.md\":\"B3MGlUHH\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>

View File

@ -1 +1 @@
import{U as o,a6 as p,a7 as u,a8 as l,a9 as c,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,d as P,u as v,y,x as w,ag as C,ah as R,ai as b,a4 as E}from"./chunks/framework.BE8if9e6.js";import{R as S}from"./chunks/theme.C4MahGFn.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function x(){return h(T)}function D(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
import{U as o,a6 as p,a7 as u,a8 as l,a9 as c,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,d as P,u as v,y,x as w,ag as C,ah as R,ai as b,a4 as E}from"./chunks/framework.BE8if9e6.js";import{R as S}from"./chunks/theme.D3Q79mSr.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function x(){return h(T)}function D(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
var Ct=Object.defineProperty;var It=(o,e,t)=>e in o?Ct(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>It(o,typeof e!="symbol"?e+"":e,t);import{X as Dt,s as oe,v as $e,aj as kt,ak as Ot,d as Rt,G as xe,al as tt,h as Fe,am as _t,an as Mt,x as Lt,ao as Pt,y as Re,R as de,Q as Ee,ap as zt,aq as Bt,Y as Vt,U as $t,ar as Wt,o as ee,b as Kt,j as k,a1 as Jt,k as j,as as Ut,at as jt,au as Gt,c as re,n as rt,e as Se,E as at,F as nt,a as ve,t as pe,av as Qt,p as qt,l as Ht,aw as it,a3 as Yt,a9 as Zt,af as Xt,ax as er,_ as tr}from"./framework.BE8if9e6.js";import{u as rr,c as ar}from"./theme.C4MahGFn.js";const nr={root:()=>Dt(()=>import("./@localSearchIndexroot.RkGdzhVE.js"),[])};/*!
var Ct=Object.defineProperty;var It=(o,e,t)=>e in o?Ct(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>It(o,typeof e!="symbol"?e+"":e,t);import{X as Dt,s as oe,v as $e,aj as kt,ak as Ot,d as Rt,G as xe,al as tt,h as Fe,am as _t,an as Mt,x as Lt,ao as Pt,y as Re,R as de,Q as Ee,ap as zt,aq as Bt,Y as Vt,U as $t,ar as Wt,o as ee,b as Kt,j as k,a1 as Jt,k as j,as as Ut,at as jt,au as Gt,c as re,n as rt,e as Se,E as at,F as nt,a as ve,t as pe,av as Qt,p as qt,l as Ht,aw as it,a3 as Yt,a9 as Zt,af as Xt,ax as er,_ as tr}from"./framework.BE8if9e6.js";import{u as rr,c as ar}from"./theme.D3Q79mSr.js";const nr={root:()=>Dt(()=>import("./@localSearchIndexroot.CoJOQdX5.js"),[])};/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var yt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=yt.join(","),mt=typeof Element>"u",ue=mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!mt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},Ie=function o(e,t){var r;t===void 0&&(t=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=n===""||n==="true",i=a||t&&e&&o(e.parentNode);return i},ir=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},gt=function(e,t,r){if(Ie(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ue.call(e,Ne)&&n.unshift(e),n=n.filter(r),n},bt=function o(e,t,r){for(var n=[],a=Array.from(e);a.length;){var i=a.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=ue.call(i,Ne);h&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!Ie(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&v){var y=o(d===!0?i.children:d.children,!0,r);r.flatten?n.push.apply(n,y):n.push({scopeParent:i,candidates:y})}else a.unshift.apply(a,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ir(e))&&!wt(e)?0:e.tabIndex},or=function(e,t){var r=se(e);return r<0&&t&&!wt(e)?0:r},sr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ur=function(e){return xt(e)&&e.type==="hidden"},lr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},cr=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},fr=function(e){if(!e.name)return!0;var t=e.form||Ce(e),r=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},n;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")n=r(window.CSS.escape(e.name));else try{n=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=cr(n,e.form);return!a||a===e},hr=function(e){return xt(e)&&e.type==="radio"},dr=function(e){return hr(e)&&!fr(e)},vr=function(e){var t,r=e&&Ce(e),n=(t=r)===null||t===void 0?void 0:t.host,a=!1;if(r&&r!==e){var i,s,u;for(a=!!((i=n)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(n)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!a&&n;){var l,h,d;r=Ce(n),n=(l=r)===null||l===void 0?void 0:l.host,a=!!((h=n)!==null&&h!==void 0&&(d=h.ownerDocument)!==null&&d!==void 0&&d.contains(n))}}return a},ot=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return r===0&&n===0},pr=function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=ue.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(ue.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof n=="function"){for(var s=e;e;){var u=e.parentElement,l=Ce(e);if(u&&!u.shadowRoot&&n(u)===!0)return ot(e);e.assignedSlot?e=e.assignedSlot:!u&&l!==e.ownerDocument?e=l.host:e=u}e=s}if(vr(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ot(e);return!1},yr=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if(n.tagName==="LEGEND")return ue.call(t,"fieldset[disabled] *")?!0:!n.contains(e)}return!0}t=t.parentElement}return!1},De=function(e,t){return!(t.disabled||Ie(t)||ur(t)||pr(t,e)||lr(t)||yr(t))},We=function(e,t){return!(dr(t)||se(t)<0||!De(e,t))},mr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},gr=function o(e){var t=[],r=[];return e.forEach(function(n,a){var i=!!n.scopeParent,s=i?n.scopeParent:n,u=or(s,i),l=i?o(n.candidates):s;u===0?i?t.push.apply(t,l):t.push(s):r.push({documentOrder:a,tabIndex:u,item:n,isScope:i,content:l})}),r.sort(sr).reduce(function(n,a){return a.isScope?n.push.apply(n,a.content):n.push(a.content),n},[]).concat(t)},br=function(e,t){t=t||{};var r;return t.getShadowRoot?r=bt([e],t.includeContainer,{filter:We.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mr}):r=gt(e,t.includeContainer,We.bind(null,t)),gr(r)},wr=function(e,t){t=t||{};var r;return t.getShadowRoot?r=bt([e],t.includeContainer,{filter:De.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=gt(e,t.includeContainer,De.bind(null,t)),r},le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ue.call(e,Ne)===!1?!1:We(t,e)},xr=yt.concat("iframe").join(","),_e=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ue.call(e,xr)===!1?!1:De(t,e)};/*!

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.BE8if9e6.js";const l="/c/assets/1.CXNJqOOc.png",e="/c/assets/2.E0LS08Y5.png",t="/c/assets/3.6recRAvz.jpeg",p="/c/assets/4.DcyDw4rB.jpg",h="/c/assets/5.q20QOAIA.png",d="/c/assets/6.CmrWpBzQ.png",k="/c/assets/7.CocAjZjO.png",r="/c/assets/8.CHZSlb-7.png",c="/c/assets/9.RD2M_pYn.png",o="/c/assets/10.CmNKK_Ug.png",u="/c/assets/11.CbGZ55Dj.png",E="/c/assets/12.DpTBR420.png",b="/c/assets/13.XcPl7d9s.png",g="/c/assets/14.DL02VQMp.png",F="/c/assets/15.Dr67r_Ws.png",y="/c/assets/16.C5XiXNVN.png",m="/c/assets/17.DO8XxSV6.jpg",C="/c/assets/18.CUXrdefp.jpeg",B="/c/assets/19.uqLiL_yu.png",v="/c/assets/20.CkykpHY2.png",A="/c/assets/21.DV1YbrOP.png",D="/c/assets/22.AHNJT9TV.png",_="/c/assets/23.Bs-MOwx2.png",q="/c/assets/24.StzjmBz-.png",f="/c/assets/25.C0wVWaxD.png",x="/c/assets/26.LXJMAihe.png",P="/c/assets/27._UTCq3PD.png",O="/c/assets/28.BjQ5kBL-.png",T="/c/assets/29.COIOzcmT.png",N="/c/assets/30.Cu__mjav.png",M="/c/assets/31.BX_KzkHt.png",w="/c/assets/32.COt_QxSP.png",K=JSON.parse('{"title":"第一章:变量(⭐)","description":"","frontmatter":{},"headers":[],"relativePath":"notes/01_c-basic/02_xdx/index.md","filePath":"notes/01_c-basic/02_xdx/index.md","lastUpdated":1721028373000}'),I={name:"notes/01_c-basic/02_xdx/index.md"},U=n('<h1 id="第一章-变量-⭐" tabindex="-1">第一章:变量(⭐) <a class="header-anchor" href="#第一章-变量-⭐" aria-label="Permalink to &quot;第一章:变量(⭐)&quot;"></a></h1><h2 id="_1-1-程序中变化的数据" tabindex="-1">1.1 程序中变化的数据 <a class="header-anchor" href="#_1-1-程序中变化的数据" aria-label="Permalink to &quot;1.1 程序中变化的数据&quot;"></a></h2><ul><li>在生活中,我们使用最多的不是固定的数据,而是会变化的数据: <ul><li>① 购物车商品的<code>数量</code>、<code>价格</code>等。</li><li>② 一首歌<code>播放的时间</code>、<code>进度条</code>、<code>歌词的展示</code>等。</li><li>③ 微信聊天中<code>消息条数</code>、<code>时间</code>、<code>语音的长度</code>、<code>头像</code>、<code>名称</code>等。</li><li>④ 游戏中技能的<code>冷却时间</code>、<code>血量</code>、<code>蓝量</code>、<code>buff 时间</code>、<code>金币的数量</code>等。</li><li>……</li></ul></li></ul><ul><li>下图是一个<code>购物车</code>中<code>变化</code>的<code>数据</code>,即:</li></ul><p><img src="'+l+'" alt=""></p><ul><li>那么,在实际开发中,我们就会使用<code>变量</code>来<code>保存</code>和<code>操作</code>这些<code>变化</code>的<code>数据</code>。</li></ul><h2 id="_1-2-变量" tabindex="-1">1.2 变量 <a class="header-anchor" href="#_1-2-变量" aria-label="Permalink to &quot;1.2 变量&quot;"></a></h2><ul><li>变量的定义:变量是程序中不可或缺的组成单位,最基本的存储单元。其实,变量就是一个存储数据的临时空间,可以向其中存储不同类型的数据,如:整数、小数、字符、字符串等,并且变量中的数据在程序运行的时候可以动态改变。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li><code>变量</code>:用来<code>存储数据</code>的<code>容器</code>。</li><li><code>数据</code>:可以是一个用来计算的<code>数字</code>,如:上文购物车中的<code>价格</code>等;也可以是一句话中的<code>关键词</code>或<code>其它任意格式的数据</code>。</li><li>变量的<code>特别</code>之处就在于<code>它存放的数据是可以改变</code>的。</li></ul></div><ul><li>我们可以将<code>变量</code>想象为一个<code>容器</code>,盒子中<code>装的</code>就是我们想要的<code>数据</code>,并且我们需要<code>给</code>盒子<code>取</code>一个<code>特别的名称</code>;通过这个<code>特别的名称</code>,我们可以<code>给</code>盒子<code>添加数据</code>或<code>移除数据</code>,这个<code>特别的名称</code>就是<code>变量名</code>。</li></ul><p><img src="'+e+`" alt=""></p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① <code>变量</code>是内存中的一个<code>存储区域</code>,该区域的数据可以在<code>同一类型</code>范围内<code>不断变化</code>。</li><li>② 通过<code>变量名</code>,可以<code>操作</code>这块内存区域,向其中<code>存储数据</code>或<code>获取数据</code>以及<code>移除数据</code>。</li><li>③ 变量的构成包含三个要素:<code>数据类型</code>、<code>变量名</code>、<code>需要存储的数据</code>。</li><li>④ 在生活中,我们会经常说:这件衣服的价格是 <code>100整型</code> 元,这双鞋子的价格是 <code>250.5(小数,浮点类型)</code> 元,<code>今天天气真好(字符串类型)</code>之类的话;在计算机科学中,这些都是数据,并且它们是有类型,即:数据类型。(数据类型用于定义变量所能存储的数据的种类以及可以对这些数据进行的操作的一种分类,每种数据类型都有特定的属性和用途,它们决定了变量在内存中如何表示和存储,以及变量可以执行哪些操作)</li></ul></div><h2 id="_1-3-变量的声明和使用" tabindex="-1">1.3 变量的声明和使用 <a class="header-anchor" href="#_1-3-变量的声明和使用" aria-label="Permalink to &quot;1.3 变量的声明和使用&quot;"></a></h2><ul><li>① 变量必须先声明,后使用。</li><li>② 可以先声明变量再赋值,也可以在声明变量的同时进行赋值。</li><li>③ 变量的值可以在同一类型范围内不断变化。</li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>在实际开发中,我们通常都会在声明变量的同时,给其赋值,这被称为初始化。</p></div><ul><li>示例:先声明,再使用</li></ul><div class="language-c vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;stdio.h&gt;</span></span>
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.BE8if9e6.js";const l="/c/assets/1.CXNJqOOc.png",e="/c/assets/2.E0LS08Y5.png",t="/c/assets/3.6recRAvz.jpeg",p="/c/assets/4.DcyDw4rB.jpg",h="/c/assets/5.q20QOAIA.png",d="/c/assets/6.CmrWpBzQ.png",k="/c/assets/7.CocAjZjO.png",r="/c/assets/8.CHZSlb-7.png",c="/c/assets/9.RD2M_pYn.png",o="/c/assets/10.CmNKK_Ug.png",u="/c/assets/11.CbGZ55Dj.png",E="/c/assets/12.DpTBR420.png",b="/c/assets/13.XcPl7d9s.png",g="/c/assets/14.DL02VQMp.png",F="/c/assets/15.Dr67r_Ws.png",y="/c/assets/16.C5XiXNVN.png",m="/c/assets/17.DO8XxSV6.jpg",C="/c/assets/18.CUXrdefp.jpeg",B="/c/assets/19.uqLiL_yu.png",v="/c/assets/20.CkykpHY2.png",A="/c/assets/21.DV1YbrOP.png",D="/c/assets/22.AHNJT9TV.png",_="/c/assets/23.Bs-MOwx2.png",q="/c/assets/24.StzjmBz-.png",f="/c/assets/25.C0wVWaxD.png",x="/c/assets/26.LXJMAihe.png",P="/c/assets/27._UTCq3PD.png",O="/c/assets/28.BjQ5kBL-.png",T="/c/assets/29.COIOzcmT.png",N="/c/assets/30.Cu__mjav.png",M="/c/assets/31.BX_KzkHt.png",w="/c/assets/32.COt_QxSP.png",K=JSON.parse('{"title":"第一章:变量(⭐)","description":"","frontmatter":{},"headers":[],"relativePath":"notes/01_c-basic/02_xdx/index.md","filePath":"notes/01_c-basic/02_xdx/index.md","lastUpdated":1721029073000}'),I={name:"notes/01_c-basic/02_xdx/index.md"},U=n('<h1 id="第一章-变量-⭐" tabindex="-1">第一章:变量(⭐) <a class="header-anchor" href="#第一章-变量-⭐" aria-label="Permalink to &quot;第一章:变量(⭐)&quot;"></a></h1><h2 id="_1-1-程序中变化的数据" tabindex="-1">1.1 程序中变化的数据 <a class="header-anchor" href="#_1-1-程序中变化的数据" aria-label="Permalink to &quot;1.1 程序中变化的数据&quot;"></a></h2><ul><li>在生活中,我们使用最多的不是固定的数据,而是会变化的数据: <ul><li>① 购物车商品的<code>数量</code>、<code>价格</code>等。</li><li>② 一首歌<code>播放的时间</code>、<code>进度条</code>、<code>歌词的展示</code>等。</li><li>③ 微信聊天中<code>消息条数</code>、<code>时间</code>、<code>语音的长度</code>、<code>头像</code>、<code>名称</code>等。</li><li>④ 游戏中技能的<code>冷却时间</code>、<code>血量</code>、<code>蓝量</code>、<code>buff 时间</code>、<code>金币的数量</code>等。</li><li>……</li></ul></li></ul><ul><li>下图是一个<code>购物车</code>中<code>变化</code>的<code>数据</code>,即:</li></ul><p><img src="'+l+'" alt=""></p><ul><li>那么,在实际开发中,我们就会使用<code>变量</code>来<code>保存</code>和<code>操作</code>这些<code>变化</code>的<code>数据</code>。</li></ul><h2 id="_1-2-变量" tabindex="-1">1.2 变量 <a class="header-anchor" href="#_1-2-变量" aria-label="Permalink to &quot;1.2 变量&quot;"></a></h2><ul><li>变量的定义:变量是程序中不可或缺的组成单位,最基本的存储单元。其实,变量就是一个存储数据的临时空间,可以向其中存储不同类型的数据,如:整数、小数、字符、字符串等,并且变量中的数据在程序运行的时候可以动态改变。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li><code>变量</code>:用来<code>存储数据</code>的<code>容器</code>。</li><li><code>数据</code>:可以是一个用来计算的<code>数字</code>,如:上文购物车中的<code>价格</code>等;也可以是一句话中的<code>关键词</code>或<code>其它任意格式的数据</code>。</li><li>变量的<code>特别</code>之处就在于<code>它存放的数据是可以改变</code>的。</li></ul></div><ul><li>我们可以将<code>变量</code>想象为一个<code>容器</code>,盒子中<code>装的</code>就是我们想要的<code>数据</code>,并且我们需要<code>给</code>盒子<code>取</code>一个<code>特别的名称</code>;通过这个<code>特别的名称</code>,我们可以<code>给</code>盒子<code>添加数据</code>或<code>移除数据</code>,这个<code>特别的名称</code>就是<code>变量名</code>。</li></ul><p><img src="'+e+`" alt=""></p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① <code>变量</code>是内存中的一个<code>存储区域</code>,该区域的数据可以在<code>同一类型</code>范围内<code>不断变化</code>。</li><li>② 通过<code>变量名</code>,可以<code>操作</code>这块内存区域,向其中<code>存储数据</code>或<code>获取数据</code>以及<code>移除数据</code>。</li><li>③ 变量的构成包含三个要素:<code>数据类型</code>、<code>变量名</code>、<code>需要存储的数据</code>。</li><li>④ 在生活中,我们会经常说:这件衣服的价格是 <code>100整型</code> 元,这双鞋子的价格是 <code>250.5(小数,浮点类型)</code> 元,<code>今天天气真好(字符串类型)</code>之类的话;在计算机科学中,这些都是数据,并且它们是有类型,即:数据类型。(数据类型用于定义变量所能存储的数据的种类以及可以对这些数据进行的操作的一种分类,每种数据类型都有特定的属性和用途,它们决定了变量在内存中如何表示和存储,以及变量可以执行哪些操作)</li></ul></div><h2 id="_1-3-变量的声明和使用" tabindex="-1">1.3 变量的声明和使用 <a class="header-anchor" href="#_1-3-变量的声明和使用" aria-label="Permalink to &quot;1.3 变量的声明和使用&quot;"></a></h2><ul><li>① 变量必须先声明,后使用。</li><li>② 可以先声明变量再赋值,也可以在声明变量的同时进行赋值。</li><li>③ 变量的值可以在同一类型范围内不断变化。</li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>在实际开发中,我们通常都会在声明变量的同时,给其赋值,这被称为初始化。</p></div><ul><li>示例:先声明,再使用</li></ul><div class="language-c vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;stdio.h&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"></span>
@ -233,4 +233,4 @@ import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.BE8if9e6.js";const l
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%#X\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, num, num);</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 100 0X64</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="_3-3-" tabindex="-1">3.3 <a class="header-anchor" href="#_3-3-" aria-label="Permalink to &quot;3.3 &quot;"></a></h2><h3 id="_3-3-1-" tabindex="-1">3.3.1 <a class="header-anchor" href="#_3-3-1-" aria-label="Permalink to &quot;3.3.1 &quot;"></a></h3><ul><li></li></ul><p><img src="`+B+'" alt=""></p><ul><li></li></ul><p><img src="'+v+'" alt=""></p><h3 id="_3-3-2-" tabindex="-1">3.3.2 <a class="header-anchor" href="#_3-3-2-" aria-label="Permalink to &quot;3.3.2 &quot;"></a></h3><h4 id="_3-3-2-1-" tabindex="-1">3.3.2.1 <a class="header-anchor" href="#_3-3-2-1-" aria-label="Permalink to &quot;3.3.2.1 &quot;"></a></h4><ul><li> 2 - 1 </li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li> <code></code></li><li> <code></code><code></code><code></code></li></ul></div><ul><li></li></ul><p><img src="'+A+'" alt=""></p><ul><li></li></ul><p><img src="'+D+'" alt=""></p><h4 id="_3-3-2-2-" tabindex="-1">3.3.2.2 <a class="header-anchor" href="#_3-3-2-2-" aria-label="Permalink to &quot;3.3.2.2 &quot;"></a></h4><ul><li> 2 0 </li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li> <code></code><code>2</code></li><li> 2 2 0 1</li><li> <code></code><code></code><code></code></li></ul></div><ul><li></li></ul><p><img src="'+_+'" alt=""></p><ul><li></li></ul><p><img src="'+q+'" alt=""></p><h3 id="_3-3-3-" tabindex="-1">3.3.3 <a class="header-anchor" href="#_3-3-3-" aria-label="Permalink to &quot;3.3.3 &quot;"></a></h3><ul><li><p> 3 </p></li><li><p>011 101 001 -&gt; 351</p></li></ul><p><img src="'+f+'" alt=""></p><h3 id="_3-3-4-" tabindex="-1">3.3.4 <a class="header-anchor" href="#_3-3-4-" aria-label="Permalink to &quot;3.3.4 &quot;"></a></h3><ul><li><p> 4 </p></li><li><p>1110 1001 -&gt; 0xE9</p></li></ul><p><img src="'+x+'" alt=""></p><h2 id="_3-4-" tabindex="-1">3.4 <a class="header-anchor" href="#_3-4-" aria-label="Permalink to &quot;3.4 &quot;"></a></h2><h3 id="_3-4-1-" tabindex="-1">3.4.1 <a class="header-anchor" href="#_3-4-1-" aria-label="Permalink to &quot;3.4.1 &quot;"></a></h3><ul><li>0 1 </li></ul><p><img src="'+P+'" alt=""></p><ul><li> 1000 0001 -1 129 </li></ul><p><img src="'+O+'" alt=""></p><h3 id="_3-4-2-" tabindex="-1">3.4.2 <a class="header-anchor" href="#_3-4-2-" aria-label="Permalink to &quot;3.4.2 &quot;"></a></h3><ul><li></li><li> <ul><li><code></code> 0 </li><li><code></code> 1 </li></ul></li><li>+1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p> <code>+0</code> <code>-0</code> <code>0</code>000 0000+0<code>1</code>000 0000-0</p></div><h3 id="_3-4-3-" tabindex="-1">3.4.3 <a class="header-anchor" href="#_3-4-3-" aria-label="Permalink to &quot;3.4.3 &quot;"></a></h3><ul><li><p></p><ul><li></li><li></li></ul></li><li><p>+1 使 8 </p></li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p> <code>+0</code> <code>0</code>000 0000 <code>0</code>000 0000 <code>-0</code> <code>1</code>000 0000 <code>1</code>111 1111</p></div><h3 id="_3-4-4-" tabindex="-1">3.4.4 <a class="header-anchor" href="#_3-4-4-" aria-label="Permalink to &quot;3.4.4 &quot;"></a></h3><ul><li><p></p><ul><li></li><li> + 1 </li></ul></li><li><p>+1 使 8 </p></li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td><td><code>1</code>111 1111</td></tr></tbody></table><ul><li> 0 <code>+0</code> </li></ul><p><img src="'+T+'" alt=""></p><ul><li> 0 <code>-0</code> </li></ul><p><img src="'+N+'" alt=""></p><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li> <code></code><code></code><code></code><code>+0</code> <code>-0</code><code></code> 0000 0000</li><li>使``<code></code><code></code>`</li><li> <code></code><code></code><code></code></li></ul></div><h3 id="_3-4-5-" tabindex="-1">3.4.5 <a class="header-anchor" href="#_3-4-5-" aria-label="Permalink to &quot;3.4.5 &quot;"></a></h3><ul><li> </li><li> 0 1 1 0 + 1 </li><li> 0 0 </li></ul><h2 id="_3-5-使" tabindex="-1">3.5 使 <a class="header-anchor" href="#_3-5-使" aria-label="Permalink to &quot;3.5 使&quot;"></a></h2><ul><li> <code>2 - 2</code> <code>2 + (-2)</code><code></code><code></code></li><li><code></code><code></code>使<code></code><code></code></li></ul><p><img src="'+M+'" alt=""></p><ul><li><code></code><code></code><code></code></li></ul><p><img src="'+w+'" alt=""></p>',244),R=[U];function L(S,X,z,j,V,H){return a(),i("div",null,R)}const Q=s(I,[["render",L]]);export{K as __pageData,Q as default};
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="_3-3-" tabindex="-1">3.3 <a class="header-anchor" href="#_3-3-" aria-label="Permalink to &quot;3.3 &quot;"></a></h2><h3 id="_3-3-1-" tabindex="-1">3.3.1 <a class="header-anchor" href="#_3-3-1-" aria-label="Permalink to &quot;3.3.1 &quot;"></a></h3><ul><li></li></ul><p><img src="`+B+'" alt=""></p><ul><li></li></ul><p><img src="'+v+'" alt=""></p><h3 id="_3-3-2-" tabindex="-1">3.3.2 <a class="header-anchor" href="#_3-3-2-" aria-label="Permalink to &quot;3.3.2 &quot;"></a></h3><h4 id="_3-3-2-1-" tabindex="-1">3.3.2.1 <a class="header-anchor" href="#_3-3-2-1-" aria-label="Permalink to &quot;3.3.2.1 &quot;"></a></h4><ul><li> 2 - 1 </li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li> <code></code></li><li> <code></code><code></code><code></code></li></ul></div><ul><li></li></ul><p><img src="'+A+'" alt=""></p><ul><li></li></ul><p><img src="'+D+'" alt=""></p><h4 id="_3-3-2-2-" tabindex="-1">3.3.2.2 <a class="header-anchor" href="#_3-3-2-2-" aria-label="Permalink to &quot;3.3.2.2 &quot;"></a></h4><ul><li> 2 0 </li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li> <code></code><code>2</code></li><li> 2 2 0 1</li><li> <code></code><code></code><code></code></li></ul></div><ul><li></li></ul><p><img src="'+_+'" alt=""></p><ul><li></li></ul><p><img src="'+q+'" alt=""></p><h3 id="_3-3-3-" tabindex="-1">3.3.3 <a class="header-anchor" href="#_3-3-3-" aria-label="Permalink to &quot;3.3.3 &quot;"></a></h3><ul><li><p> 3 </p></li><li><p>011 101 001 -&gt; 351</p></li></ul><p><img src="'+f+'" alt=""></p><h3 id="_3-3-4-" tabindex="-1">3.3.4 <a class="header-anchor" href="#_3-3-4-" aria-label="Permalink to &quot;3.3.4 &quot;"></a></h3><ul><li><p> 4 </p></li><li><p>1110 1001 -&gt; 0xE9</p></li></ul><p><img src="'+x+'" alt=""></p><h2 id="_3-4-" tabindex="-1">3.4 <a class="header-anchor" href="#_3-4-" aria-label="Permalink to &quot;3.4 &quot;"></a></h2><h3 id="_3-4-1-" tabindex="-1">3.4.1 <a class="header-anchor" href="#_3-4-1-" aria-label="Permalink to &quot;3.4.1 &quot;"></a></h3><ul><li>0 1 </li></ul><p><img src="'+P+'" alt=""></p><ul><li> 1000 0001 -1 129 </li></ul><p><img src="'+O+'" alt=""></p><h3 id="_3-4-2-" tabindex="-1">3.4.2 <a class="header-anchor" href="#_3-4-2-" aria-label="Permalink to &quot;3.4.2 &quot;"></a></h3><ul><li></li><li> <ul><li><code></code> 0 </li><li><code></code> 1 </li></ul></li><li>+1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p> <code>+0</code> <code>-0</code> <code>0</code>000 0000+0<code>1</code>000 0000-0</p></div><h3 id="_3-4-3-" tabindex="-1">3.4.3 <a class="header-anchor" href="#_3-4-3-" aria-label="Permalink to &quot;3.4.3 &quot;"></a></h3><ul><li><p></p><ul><li></li><li></li></ul></li><li><p>+1 使 8 </p></li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p> <code>+0</code> <code>0</code>000 0000 <code>0</code>000 0000 <code>-0</code> <code>1</code>000 0000 <code>1</code>111 1111</p></div><h3 id="_3-4-4-" tabindex="-1">3.4.4 <a class="header-anchor" href="#_3-4-4-" aria-label="Permalink to &quot;3.4.4 &quot;"></a></h3><ul><li><p></p><ul><li></li><li> + 1 </li></ul></li><li><p>+1 使 8 </p></li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th><th>8</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 使 8 </li></ul><table tabindex="0"><thead><tr><th></th><th>8</th><th>8</th><th>8</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td><td><code>1</code>111 1111</td></tr></tbody></table><ul><li> 0 <code>+0</code> </li></ul><p><img src="'+T+'" alt=""></p><ul><li> 0 <code>-0</code> </li></ul><p><img src="'+N+'" alt=""></p><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li> <code></code><code></code><code></code><code>+0</code> <code>-0</code><code></code> 0000 0000</li><li>使``<code></code><code></code>`</li><li> <code></code><code></code><code></code></li></ul></div><h3 id="_3-4-5-" tabindex="-1">3.4.5 <a class="header-anchor" href="#_3-4-5-" aria-label="Permalink to &quot;3.4.5 &quot;"></a></h3><ul><li> </li><li> 0 1 1 0 + 1 </li><li> 0 0 </li></ul><h2 id="_3-5-使" tabindex="-1">3.5 使 <a class="header-anchor" href="#_3-5-使" aria-label="Permalink to &quot;3.5 使&quot;"></a></h2><ul><li> <code>2 - 2</code> <code>2 + (-2)</code><code></code><code></code></li><li><code></code><code></code>使<code></code><code></code></li></ul><p><img src="'+M+'" alt=""></p><ul><li><code></code><code></code><code></code></li></ul><p><img src="'+w+'" alt=""></p>',244),R=[U];function L(S,X,z,j,V,H){return a(),i("div",null,R)}const Q=s(I,[["render",L]]);export{K as __pageData,Q as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.BE8if9e6.js";const l="/c/assets/1.CXNJqOOc.png",e="/c/assets/2.E0LS08Y5.png",t="/c/assets/3.6recRAvz.jpeg",p="/c/assets/4.DcyDw4rB.jpg",h="/c/assets/5.q20QOAIA.png",d="/c/assets/6.CmrWpBzQ.png",k="/c/assets/7.CocAjZjO.png",r="/c/assets/8.CHZSlb-7.png",c="/c/assets/9.RD2M_pYn.png",o="/c/assets/10.CmNKK_Ug.png",u="/c/assets/11.CbGZ55Dj.png",E="/c/assets/12.DpTBR420.png",b="/c/assets/13.XcPl7d9s.png",g="/c/assets/14.DL02VQMp.png",F="/c/assets/15.Dr67r_Ws.png",y="/c/assets/16.C5XiXNVN.png",m="/c/assets/17.DO8XxSV6.jpg",C="/c/assets/18.CUXrdefp.jpeg",B="/c/assets/19.uqLiL_yu.png",v="/c/assets/20.CkykpHY2.png",A="/c/assets/21.DV1YbrOP.png",D="/c/assets/22.AHNJT9TV.png",_="/c/assets/23.Bs-MOwx2.png",q="/c/assets/24.StzjmBz-.png",f="/c/assets/25.C0wVWaxD.png",x="/c/assets/26.LXJMAihe.png",P="/c/assets/27._UTCq3PD.png",O="/c/assets/28.BjQ5kBL-.png",T="/c/assets/29.COIOzcmT.png",N="/c/assets/30.Cu__mjav.png",M="/c/assets/31.BX_KzkHt.png",w="/c/assets/32.COt_QxSP.png",K=JSON.parse('{"title":"第一章:变量(⭐)","description":"","frontmatter":{},"headers":[],"relativePath":"notes/01_c-basic/02_xdx/index.md","filePath":"notes/01_c-basic/02_xdx/index.md","lastUpdated":1721028373000}'),I={name:"notes/01_c-basic/02_xdx/index.md"},U=n("",244),R=[U];function L(S,X,z,j,V,H){return a(),i("div",null,R)}const Q=s(I,[["render",L]]);export{K as __pageData,Q as default};
import{_ as s,c as i,o as a,a5 as n}from"./chunks/framework.BE8if9e6.js";const l="/c/assets/1.CXNJqOOc.png",e="/c/assets/2.E0LS08Y5.png",t="/c/assets/3.6recRAvz.jpeg",p="/c/assets/4.DcyDw4rB.jpg",h="/c/assets/5.q20QOAIA.png",d="/c/assets/6.CmrWpBzQ.png",k="/c/assets/7.CocAjZjO.png",r="/c/assets/8.CHZSlb-7.png",c="/c/assets/9.RD2M_pYn.png",o="/c/assets/10.CmNKK_Ug.png",u="/c/assets/11.CbGZ55Dj.png",E="/c/assets/12.DpTBR420.png",b="/c/assets/13.XcPl7d9s.png",g="/c/assets/14.DL02VQMp.png",F="/c/assets/15.Dr67r_Ws.png",y="/c/assets/16.C5XiXNVN.png",m="/c/assets/17.DO8XxSV6.jpg",C="/c/assets/18.CUXrdefp.jpeg",B="/c/assets/19.uqLiL_yu.png",v="/c/assets/20.CkykpHY2.png",A="/c/assets/21.DV1YbrOP.png",D="/c/assets/22.AHNJT9TV.png",_="/c/assets/23.Bs-MOwx2.png",q="/c/assets/24.StzjmBz-.png",f="/c/assets/25.C0wVWaxD.png",x="/c/assets/26.LXJMAihe.png",P="/c/assets/27._UTCq3PD.png",O="/c/assets/28.BjQ5kBL-.png",T="/c/assets/29.COIOzcmT.png",N="/c/assets/30.Cu__mjav.png",M="/c/assets/31.BX_KzkHt.png",w="/c/assets/32.COt_QxSP.png",K=JSON.parse('{"title":"第一章:变量(⭐)","description":"","frontmatter":{},"headers":[],"relativePath":"notes/01_c-basic/02_xdx/index.md","filePath":"notes/01_c-basic/02_xdx/index.md","lastUpdated":1721029073000}'),I={name:"notes/01_c-basic/02_xdx/index.md"},U=n("",244),R=[U];function L(S,X,z,j,V,H){return a(),i("div",null,R)}const Q=s(I,[["render",L]]);export{K as __pageData,Q as default};

View File

@ -1 +1 @@
{"index.md":"uFk6fSzW","notes_index.md":"CdHKXnBk","notes_01_c-basic_02_xdx_index.md":"CB8oZG6k","notes_01_c-basic_01_xdx_index.md":"DA3nuW_4"}
{"notes_index.md":"CdHKXnBk","index.md":"uFk6fSzW","notes_01_c-basic_02_xdx_index.md":"B3MGlUHH","notes_01_c-basic_01_xdx_index.md":"DA3nuW_4"}

View File

@ -8,10 +8,10 @@
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/c/assets/style.bTUc_nQv.css" as="style">
<script type="module" src="/c/assets/app.DJvpVQC4.js"></script>
<script type="module" src="/c/assets/app.C14JyXvG.js"></script>
<link rel="preload" href="/c/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/c/assets/chunks/framework.BE8if9e6.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.C4MahGFn.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.D3Q79mSr.js">
<link rel="modulepreload" href="/c/assets/index.md.uFk6fSzW.lean.js">
<link rel="shortcut icon" href="/c//logo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,shrink-to-fit=no">
@ -21,7 +21,7 @@
</head>
<body>
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar home top" data-v-ae24b3ad data-v-ccf7ddec><div class="wrapper" data-v-ccf7ddec><div class="container" data-v-ccf7ddec><div class="title" data-v-ccf7ddec><div class="VPNavBarTitle" data-v-ccf7ddec data-v-ab179fa1><a class="title" href="/c/" data-v-ab179fa1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/c/logo.svg" alt data-v-8426fc1a><!--]--><span data-v-ab179fa1>许大仙</span><!--[--><!--]--></a></div></div><div class="content" data-v-ccf7ddec><div class="content-body" data-v-ccf7ddec><!--[--><!--]--><div class="VPNavBarSearch search" data-v-ccf7ddec><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-ccf7ddec data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/coa6/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>计组6件套</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/c/notes/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>c/c++</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/web-design/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>前端</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/java/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Java</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/big-data/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>大数据</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/linux/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>云原生</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/open-software/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>开源软件</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-ccf7ddec data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-ccf7ddec data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Aurorxa" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-ccf7ddec data-v-d0bd9dde data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-b6c34ac9><span class="vpi-more-horizontal icon" data-v-b6c34ac9></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-d0bd9dde><div class="item appearance" data-v-d0bd9dde><p class="label" data-v-d0bd9dde>Appearance</p><div class="appearance-action" data-v-d0bd9dde><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-d0bd9dde data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div></div></div><div class="group" data-v-d0bd9dde><div class="item social-links" data-v-d0bd9dde><div class="VPSocialLinks social-links-list" data-v-d0bd9dde data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Aurorxa" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-ccf7ddec data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-ccf7ddec><div class="divider-line" data-v-ccf7ddec></div></div></div><!----></header><!----><!----><div class="VPContent is-home" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPHome" data-v-1428d186 data-v-686f80a6><!--[--><!--]--><div class="VPHero VPHomeHero" data-v-686f80a6 data-v-303bb580><div class="container" data-v-303bb580><div class="main" data-v-303bb580><!--[--><!--]--><!--[--><h1 class="name" data-v-303bb580><span class="clip" data-v-303bb580>许大仙同学</span></h1><!----><p class="tagline" data-v-303bb580>『这个世纪疯狂,没人性,腐败;你却一直清醒,温柔,一尘不染。』</p><!--]--><!--[--><!--]--><div class="actions" data-v-303bb580><!--[--><div class="action" data-v-303bb580><a class="VPButton medium brand" href="https://aexiar.github.io" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>首页</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="https://aexiar.github.io/coa6/notes/" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>计组6件套</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="/c/notes/" data-v-303bb580 data-v-cad61b99>c/c++</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="https://aexiar.github.io/web-design/notes/" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>前端</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="https://aexiar.github.io/java/notes/" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>Java</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="https://aexiar.github.io/big-data/notes/" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>大数据</a></div><div class="action" data-v-303bb580><a class="VPButton medium alt" href="https://aexiar.github.io/linux/notes/" target="_blank" rel="noreferrer" data-v-303bb580 data-v-cad61b99>云原生</a></div><!--]--></div><!--[--><!--]--></div><!----></div></div><!--[--><!--]--><!--[--><!--]--><div class="VPFeatures VPHomeFeatures" data-v-686f80a6 data-v-a6181336><div class="container" data-v-a6181336><div class="items" data-v-a6181336><!--[--><div class="grid-3 item" data-v-a6181336><div class="VPLink no-icon VPFeature" data-v-a6181336 data-v-a3976bdc><!--[--><article class="box" data-v-a3976bdc><!----><h2 class="title" data-v-a3976bdc>学习思路</h2><p class="details" data-v-a3976bdc>学习思路就这么几条:模仿、遍历、分治、动态规划、……</p><!----></article><!--]--></div></div><div class="grid-3 item" data-v-a6181336><div class="VPLink no-icon VPFeature" data-v-a6181336 data-v-a3976bdc><!--[--><article class="box" data-v-a3976bdc><!----><h2 class="title" data-v-a3976bdc>学习手法</h2><p class="details" data-v-a3976bdc>学习手法就这么几种:缓存、索引、信号/事件、回调/消息循环/dispatcher、……</p><!----></article><!--]--></div></div><div class="grid-3 item" data-v-a6181336><div class="VPLink no-icon VPFeature" data-v-a6181336 data-v-a3976bdc><!--[--><article class="box" data-v-a3976bdc><!----><h2 class="title" data-v-a3976bdc>注意事项</h2><p class="details" data-v-a3976bdc>注意事项就这么几点:边界值、等价类、数据完整性原子性、死锁、空转、……</p><!----></article><!--]--></div></div><!--]--></div></div></div><!--[--><!--]--><div class="vp-doc container" style="" data-v-686f80a6 data-v-8e2d4988><!--[--><div style="position:relative;" data-v-686f80a6><div></div></div><!--]--></div></div></div><footer class="VPFooter" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024 许大仙</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"uFk6fSzW\",\"notes_index.md\":\"CdHKXnBk\",\"notes_01_c-basic_02_xdx_index.md\":\"CB8oZG6k\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"notes_index.md\":\"CdHKXnBk\",\"index.md\":\"uFk6fSzW\",\"notes_01_c-basic_02_xdx_index.md\":\"B3MGlUHH\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>

View File

@ -8,10 +8,10 @@
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/c/assets/style.bTUc_nQv.css" as="style">
<script type="module" src="/c/assets/app.DJvpVQC4.js"></script>
<script type="module" src="/c/assets/app.C14JyXvG.js"></script>
<link rel="preload" href="/c/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/c/assets/chunks/framework.BE8if9e6.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.C4MahGFn.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.D3Q79mSr.js">
<link rel="modulepreload" href="/c/assets/notes_01_c-basic_01_xdx_index.md.DA3nuW_4.lean.js">
<link rel="shortcut icon" href="/c//logo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,shrink-to-fit=no">
@ -246,7 +246,7 @@
<span class="line"><span>.idea</span></span>
<span class="line"><span>cmake-build-*</span></span>
<span class="line"><span>build</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h2 id="_7-6-演示" tabindex="-1">7.6 演示 <a class="header-anchor" href="#_7-6-演示" aria-label="Permalink to &quot;7.6 演示&quot;"></a></h2><ul><li>我们可以在项目中,临时创建或复制一个文件,看上述配置是否生效,即:</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><p>如果是复制并粘贴一个文件到项目中,请点击<code>重新加载 CMake 项目</code></p></div><p><img src="/c/assets/158.C1t2T6FV.gif" alt=""></p><h1 id="第八章-c-语言的编译过程-⭐" tabindex="-1">第八章C 语言的编译过程(⭐) <a class="header-anchor" href="#第八章-c-语言的编译过程-⭐" aria-label="Permalink to &quot;第八章C 语言的编译过程(⭐)&quot;"></a></h1><h2 id="_8-1-概述" tabindex="-1">8.1 概述 <a class="header-anchor" href="#_8-1-概述" aria-label="Permalink to &quot;8.1 概述&quot;"></a></h2><ul><li>C 程序的编译过程,如下所示:</li></ul><p><img src="/c/assets/159.Rqa4uHq6.png" alt=""></p><ul><li>过程 ① :编写(编辑)源代码,即:编写 C 语言源程序代码,并以文件的形式存储在磁盘中。</li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>源程序需要以 <code>.c</code> 作为扩展名。</p></div><ul><li>过程 ② :编译,即:将 C 语言源程序转换为<code>目标程序(或目标文件)</code>。如果程序没有错误,没有任何提示,就会生成一个扩展名为 <code>.obj</code><code>.o</code> 的二进制文件。C 语言中的每条可执行语句经过编译之后,最终都会转换为二进制的机器指令。</li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li><p>① 其实,<code>编译阶段</code>包含了<code>预处理</code><code>编译</code><code>汇编</code></p></li><li><p><code>预处理</code>是编译过程的第一个阶段。在这个阶段,预处理器处理源代码中的指令(例如:<code>#include</code><code>#define</code>等),主要任务包括:</p><ul><li><p><strong>头文件包含</strong>:将头文件的内容插入到源文件中。例如:<code>#include &lt;stdio.h&gt;</code>会被替换为<code>stdio.h</code>文件的内容。</p></li><li><p><strong>宏展开</strong>:替换宏定义。例如:<code>#define PI 3.14</code>会将代码中的<code>PI</code>替换为<code>3.14</code></p></li><li><p><strong>条件编译</strong>:根据条件指令(如:<code>#ifdef</code><code>#ifndef</code>)有选择地编译代码。</p></li><li><p><strong>删除代码中的注释,但是不会进行语法检查</strong></p></li><li><p>预处理完成后,生成一个扩展名为<code>.i</code>的中间文件。</p></li></ul></li><li><p><code>编译</code>是将预处理后的源代码转换为汇编代码的过程。在这个阶段,编译器会检查代码的语法和语义,将其转换为目标机器的汇编语言,生成一个扩展名为<code>.s</code>的汇编文件。</p></li><li><p><code>汇编</code>是将汇编代码转换为机器代码(也称为目标代码或目标文件)的过程。在这个阶段,汇编器将汇编指令转换为二进制机器指令,生成一个扩展名为<code>.o</code><code>.obj</code>的目标文件。</p></li></ul></div><ul><li>过程 ③ :链接(连接),即:将编译形成的目标文件 <code>*.obj</code><code>*.o</code>和库函数以及其他目录文件<code>链接</code>,形成一个统一的二进制文件 <code>*.exe</code></li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li>为什么需要链接库文件?</li><li>因为我们的 C 程序会使用 C 程序库中的内容,如:<code>&lt;stdio.h&gt;</code> 中的 <code>printf()</code> 函数,这些函数不是程序员自己写的,而是 C 程序库中提供的因此需要链接。其实在链接过程中还会加入启动代码这个启动代码和系统相关Linux 下主要有 crt0.c、crti.c 等,它们设置堆栈后,再调用 main() 函数)负责初始化程序运行时的环境。</li></ul></div><ul><li>过程 ④ :执行,即:有了可执行的 <code>*.exe</code>文件,我们就可以在控制台上执行运行此 <code>*.exe</code> 文件。</li></ul><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>如果<code>修改</code>了源代码,还需要重新<code>编译</code><code>链接</code>,并生成新的 <code>*.exe</code>文件,再执行,方能生效。</p></div><h2 id="_8-2-gcc-编译器的介绍" tabindex="-1">8.2 GCC 编译器的介绍 <a class="header-anchor" href="#_8-2-gcc-编译器的介绍" aria-label="Permalink to &quot;8.2 GCC 编译器的介绍&quot;"></a></h2><ul><li>编辑器vim 、vscode 等,是指我们用它来编写源程序的(编辑代码),而我们写的代码语句,电脑是不懂的,我们需要把它转成电脑能懂的语句,编译器就是这样的转化工具。换言之,我们用编辑器编写程序,由编译器编译后才可以运行!</li><li>编译器是将易于编写、阅读和维护的高级计算机语言翻译为计算机能解读、运行的低级机器语言的程序。</li><li>gccGNU Compiler CollectionGNU 编译器套件),是由 GNU 开发的编程语言编译器。gcc 原本作为 GNU 操作系统的官方编译器,现已被大多数类 Unix 操作系统Linux、BSD、Mac OS X 等采纳为标准的编译器gcc 同样适用于微软的 Windows 。</li><li>gcc 最初用于编译 C 语言,随着项目的发展, gcc 已经成为了能够编译 C、C++、Java、Ada、fortran、Object C、Object C++、Go 语言的编译器大家族。</li></ul><h2 id="_8-3-通过-gcc-直接生成可执行文件" tabindex="-1">8.3 通过 gcc 直接生成可执行文件 <a class="header-anchor" href="#_8-3-通过-gcc-直接生成可执行文件" aria-label="Permalink to &quot;8.3 通过 gcc 直接生成可执行文件&quot;"></a></h2><ul><li>示例:进行预处理、编译、汇编和链接</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.c</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.exe</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p><img src="/c/assets/160.6yQYnjOa.gif" alt=""></p><h2 id="_8-4-通过-gcc-分步编译" tabindex="-1">8.4 通过 gcc 分步编译 <a class="header-anchor" href="#_8-4-通过-gcc-分步编译" aria-label="Permalink to &quot;8.4 通过 gcc 分步编译&quot;"></a></h2><h3 id="_8-3-1-概述" tabindex="-1">8.3.1 概述 <a class="header-anchor" href="#_8-3-1-概述" aria-label="Permalink to &quot;8.3.1 概述&quot;"></a></h3><ul><li>预处理命令:</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -E</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.c</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.i</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 通常以 .i 结尾表示这个文件是一个中间状态</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><ul><li>编译(预处理和编译)命令:</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -S</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.i</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.s</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 在 Linux 中,通常以 .s 结尾;在 Windows 中,通常以 .asm 结尾</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><ul><li>汇编(预处理、编译和汇编)命令:</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -c</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.s</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.o</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 在 Linux 中,通常以 .o 结尾;在 Windows 中,通常以 .obj 结尾</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><ul><li>链接(预处理、编译、汇编和链接)命令:</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.o</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 源文件.exe</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 在 Linux 中,通常以 .out 结尾;在 Windows 中,通常以 .exe 结尾</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><h3 id="_8-4-2-应用示例" tabindex="-1">8.4.2 应用示例 <a class="header-anchor" href="#_8-4-2-应用示例" aria-label="Permalink to &quot;8.4.2 应用示例&quot;"></a></h3><ul><li>示例:只进行预处理</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -E</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.c</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.i</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p><img src="/c/assets/161.hYR9GiiD.gif" alt=""></p><ul><li>示例:只进行预处理和编译</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -S</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.i</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.s</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p><img src="/c/assets/162.D3b-QIrA.gif" alt=""></p><ul><li>示例:只进行预处理、编译和汇编</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -c</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.s</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.o</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p><img src="/c/assets/163.DGbA6qsW.gif" alt=""></p><ul><li>示例:进行预处理、编译、汇编和链接</li></ul><div class="language-shell vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gcc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.o</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HelloWorld.exe</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p><img src="/c/assets/164.BToOkxf2.gif" alt=""></p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-d4a0bba5><!--[--><!--]--><div class="edit-info" data-v-d4a0bba5><!----><div class="last-updated" data-v-d4a0bba5><p class="VPLastUpdated" data-v-d4a0bba5 data-v-7e05ebdb>上次更新: <time datetime="2024-07-11T08:05:05.000Z" data-v-7e05ebdb></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d4a0bba5><span class="visually-hidden" id="doc-footer-aria-label" data-v-d4a0bba5>Pager</span><div class="pager" data-v-d4a0bba5><!----></div><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link next" href="/c/notes/01_c-basic/02_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>下一篇</span><span class="title" data-v-d4a0bba5>变量和进制</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024 许大仙</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"uFk6fSzW\",\"notes_index.md\":\"CdHKXnBk\",\"notes_01_c-basic_02_xdx_index.md\":\"CB8oZG6k\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"notes_index.md\":\"CdHKXnBk\",\"index.md\":\"uFk6fSzW\",\"notes_01_c-basic_02_xdx_index.md\":\"B3MGlUHH\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>

View File

@ -8,11 +8,11 @@
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/c/assets/style.bTUc_nQv.css" as="style">
<script type="module" src="/c/assets/app.DJvpVQC4.js"></script>
<script type="module" src="/c/assets/app.C14JyXvG.js"></script>
<link rel="preload" href="/c/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/c/assets/chunks/framework.BE8if9e6.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.C4MahGFn.js">
<link rel="modulepreload" href="/c/assets/notes_01_c-basic_02_xdx_index.md.CB8oZG6k.lean.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.D3Q79mSr.js">
<link rel="modulepreload" href="/c/assets/notes_01_c-basic_02_xdx_index.md.B3MGlUHH.lean.js">
<link rel="shortcut icon" href="/c//logo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,shrink-to-fit=no">
<meta name="keywords" content="许大仙,许大仙的博客">
@ -255,8 +255,8 @@
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 的十六进制(前缀)整数: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%#X\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, num, num);</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 100 的十六进制(前缀)整数: 0X64</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="_3-3-进制的转换" tabindex="-1">3.3 进制的转换 <a class="header-anchor" href="#_3-3-进制的转换" aria-label="Permalink to &quot;3.3 进制的转换&quot;"></a></h2><h3 id="_3-3-1-概述" tabindex="-1">3.3.1 概述 <a class="header-anchor" href="#_3-3-1-概述" aria-label="Permalink to &quot;3.3.1 概述&quot;"></a></h3><ul><li>不同进制的转换,如下所示:</li></ul><p><img src="/c/assets/19.uqLiL_yu.png" alt=""></p><ul><li>在计算机中,数据是从右往左的方式排列的;其中,最右边的是低位,最左边的是高位,即:</li></ul><p><img src="/c/assets/20.CkykpHY2.png" alt=""></p><h3 id="_3-3-2-二进制和十进制的转换" tabindex="-1">3.3.2 二进制和十进制的转换 <a class="header-anchor" href="#_3-3-2-二进制和十进制的转换" aria-label="Permalink to &quot;3.3.2 二进制和十进制的转换&quot;"></a></h3><h4 id="_3-3-2-1-二进制转换为十进制" tabindex="-1">3.3.2.1 二进制转换为十进制 <a class="header-anchor" href="#_3-3-2-1-二进制转换为十进制" aria-label="Permalink to &quot;3.3.2.1 二进制转换为十进制&quot;"></a></h4><ul><li>规则:从最低位开始,将每个位上的数提取出来,乘以 2 的 (位数 - 1 )次方,然后求和。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① 在学术界,将这种计算规则,称为<code>位权相加法</code></li><li><code>八进制转换为十进制</code><code>十六进制转换为十进制</code><code>二进制转换为十进制</code>的算法相同!!!</li></ul></div><ul><li>示例:十进制转十进制</li></ul><p><img src="/c/assets/21.DV1YbrOP.png" alt=""></p><ul><li>示例:二进制转十进制</li></ul><p><img src="/c/assets/22.AHNJT9TV.png" alt=""></p><h4 id="_3-3-2-2-十进制转换二进制" tabindex="-1">3.3.2.2 十进制转换二进制 <a class="header-anchor" href="#_3-3-2-2-十进制转换二进制" aria-label="Permalink to &quot;3.3.2.2 十进制转换二进制&quot;"></a></h4><ul><li>规则:将该数不断除以 2 ,直到商为 0 为止,然后将每步得到的余数倒过来,就是对应的二进制。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① 在学术界,将这种计算规则,称为<code>短除法</code><code>连续除2取余法</code></li><li>② 很好理解,只有不断地除以 2 ,就能保证最大的数字不超过 2 ,这不就是二进制(只能有 0 或 1</li><li><code>八进制转换为二进制</code><code>十六进制转换为二进制</code><code>十进制转换为二进制</code>的算法相同!!!</li></ul></div><ul><li>示例:十进制转十进制</li></ul><p><img src="/c/assets/23.Bs-MOwx2.png" alt=""></p><ul><li>示例:十进制转二进制</li></ul><p><img src="/c/assets/24.StzjmBz-.png" alt=""></p><h3 id="_3-3-3-二进制转八进制" tabindex="-1">3.3.3 二进制转八进制 <a class="header-anchor" href="#_3-3-3-二进制转八进制" aria-label="Permalink to &quot;3.3.3 二进制转八进制&quot;"></a></h3><ul><li><p>规则:每 3 位二进制就是一个八进制。</p></li><li><p>示例011 101 001 -&gt; 351</p></li></ul><p><img src="/c/assets/25.C0wVWaxD.png" alt=""></p><h3 id="_3-3-4-二进制转十六进制" tabindex="-1">3.3.4 二进制转十六进制 <a class="header-anchor" href="#_3-3-4-二进制转十六进制" aria-label="Permalink to &quot;3.3.4 二进制转十六进制&quot;"></a></h3><ul><li><p>规则:每 4 位二进制就是一个进制。</p></li><li><p>示例1110 1001 -&gt; 0xE9</p></li></ul><p><img src="/c/assets/26.LXJMAihe.png" alt=""></p><h2 id="_3-4-原码、反码和补码" tabindex="-1">3.4 原码、反码和补码 <a class="header-anchor" href="#_3-4-原码、反码和补码" aria-label="Permalink to &quot;3.4 原码、反码和补码&quot;"></a></h2><h3 id="_3-4-1-概述" tabindex="-1">3.4.1 概述 <a class="header-anchor" href="#_3-4-1-概述" aria-label="Permalink to &quot;3.4.1 概述&quot;"></a></h3><ul><li>机器数一个数在计算机的存储形式是二进制我们称这些二进制数为机器数。机器数可以是有符号的用机器数的最高位来存放符号位0 表示正数1 表示负数。</li></ul><p><img src="/c/assets/27._UTCq3PD.png" alt=""></p><ul><li>真值:因为机器数带有符号位,所以机器数的形式值不等于其真实表示的值(真值),以机器数 1000 0001 为例,其真正表示的值(首位是符号位)为 -1而形式值却是 129 ,因此将带有符号位的机器数的真正表示的值称为机器数的真值。</li></ul><p><img src="/c/assets/28.BjQ5kBL-.png" alt=""></p><h3 id="_3-4-2-原码" tabindex="-1">3.4.2 原码 <a class="header-anchor" href="#_3-4-2-原码" aria-label="Permalink to &quot;3.4.2 原码&quot;"></a></h3><ul><li>原码的表示与机器数真值表示的一样,即用第一位表示符号,其余位表示数值。</li><li>规则: <ul><li>正数的<code>原码</code>是它本身对应的二进制数,符号位是 0 。</li><li>负数的<code>原码</code>是它本身绝对值对应的二进制数,但是符号位是 1 。</li></ul></li><li>+1 的原码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的原码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>按照原码的规则,会出现 <code>+0</code><code>-0</code> 的情况,即:<code>0</code>000 0000+0<code>1</code>000 0000-0显然不符合实际情况所以计算机底层虽然存储和计算的都是二进数但显然不是原码。</p></div><h3 id="_3-4-3-反码" tabindex="-1">3.4.3 反码 <a class="header-anchor" href="#_3-4-3-反码" aria-label="Permalink to &quot;3.4.3 反码&quot;"></a></h3><ul><li><p>规则:</p><ul><li>正数的反码和它的原码相同。</li><li>负数的反码是在其原码的基础上,符号位不变,其余各位取反。</li></ul></li><li><p>+1 的反码,使用 8 位二进数来表示,就是:</p></li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的反码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>按照反码的规则,如果是 <code>+0</code>,对应的原码是 <code>0</code>000 0000那么其反码还是 <code>0</code>000 0000 ;如果是 <code>-0</code>,对应的原码是 <code>1</code>000 0000其反码是 <code>1</code>111 1111显然不符合实际情况所以计算机底层虽然存储和计算的都是二进数但显然不是反码。</p></div><h3 id="_3-4-4-补码" tabindex="-1">3.4.4 补码 <a class="header-anchor" href="#_3-4-4-补码" aria-label="Permalink to &quot;3.4.4 补码&quot;"></a></h3><ul><li><p>规则:</p><ul><li>正数的补码和它的原码相同。</li><li>负数的补码是在其反码的基础上 + 1 。</li></ul></li><li><p>+1 的补码,使用 8 位二进数来表示,就是:</p></li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th><th>补码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的补码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th><th>补码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td><td><code>1</code>111 1111</td></tr></tbody></table><ul><li>如果 0 ,按照 <code>+0</code> 的情况进行处理,即:</li></ul><p><img src="/c/assets/29.COIOzcmT.png" alt=""></p><ul><li>如果 0 ,按照 <code>-0</code> 的情况进行处理,即:</li></ul><p><img src="/c/assets/30.Cu__mjav.png" alt=""></p><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li>① 补码表示法解决了<code>原码</code><code>反码</code>存在的<code>两种</code>零(<code>+0</code><code>-0</code>)的问题,即:在补码表示法中,只有<code>一个</code>零,即 0000 0000。</li><li>②补码使得``加法运算<code></code>减法运算<code>可以统一处理,通过将减法运算</code>转换`为加法运算,可以简化硬件设计,提高了运算效率。</li><li>③ 计算机底层<code>存储</code><code>计算</code>的都是<code>二进数的补码</code></li></ul></div><h3 id="_3-4-5-总结" tabindex="-1">3.4.5 总结 <a class="header-anchor" href="#_3-4-5-总结" aria-label="Permalink to &quot;3.4.5 总结&quot;"></a></h3><ul><li>① 正数的原码、反码和补码都是一样的,三码合一。</li><li>② 负数的反码是在其原码的基础上按位取反0 变 1 1 变 0 ),符号位不变;负数的补码是其反码 + 1 。</li><li>③ 0 的补码是 0 。</li></ul><h2 id="_3-5-计算机底层为什么使用补码" tabindex="-1">3.5 计算机底层为什么使用补码? <a class="header-anchor" href="#_3-5-计算机底层为什么使用补码" aria-label="Permalink to &quot;3.5 计算机底层为什么使用补码?&quot;"></a></h2><ul><li>如果计算是 <code>2 - 2</code> ,那么可以转换为 <code>2 + (-2)</code>,这样计算机内部在处理<code>减法计算</code>的时候,就会将其转换为<code>加法计算</code>的形式,以简化硬件设计和提高计算效率。</li><li><code>最高位</code>表示<code>符号位</code>,由于符号位的存在,如果使用<code>原码</code>来计算,就会导致<code>计算结果不正确</code>,即:</li></ul><p><img src="/c/assets/31.BX_KzkHt.png" alt=""></p><ul><li><code>补码</code>的设计可以巧妙的让<code>符号位</code>也参与计算,并且可以得到<code>正确的计算结果</code>,即:</li></ul><p><img src="/c/assets/32.COt_QxSP.png" alt=""></p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-d4a0bba5><!--[--><!--]--><div class="edit-info" data-v-d4a0bba5><!----><div class="last-updated" data-v-d4a0bba5><p class="VPLastUpdated" data-v-d4a0bba5 data-v-7e05ebdb>上次更新: <time datetime="2024-07-15T07:26:13.000Z" data-v-7e05ebdb></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d4a0bba5><span class="visually-hidden" id="doc-footer-aria-label" data-v-d4a0bba5>Pager</span><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link prev" href="/c/notes/01_c-basic/01_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>上一篇</span><span class="title" data-v-d4a0bba5>C 语言入门</span><!--]--></a></div><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link next" href="/c/notes/02_dsa/01_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>下一篇</span><span class="title" data-v-d4a0bba5>初识 C 语言</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024 许大仙</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"uFk6fSzW\",\"notes_index.md\":\"CdHKXnBk\",\"notes_01_c-basic_02_xdx_index.md\":\"CB8oZG6k\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h2 id="_3-3-进制的转换" tabindex="-1">3.3 进制的转换 <a class="header-anchor" href="#_3-3-进制的转换" aria-label="Permalink to &quot;3.3 进制的转换&quot;"></a></h2><h3 id="_3-3-1-概述" tabindex="-1">3.3.1 概述 <a class="header-anchor" href="#_3-3-1-概述" aria-label="Permalink to &quot;3.3.1 概述&quot;"></a></h3><ul><li>不同进制的转换,如下所示:</li></ul><p><img src="/c/assets/19.uqLiL_yu.png" alt=""></p><ul><li>在计算机中,数据是从右往左的方式排列的;其中,最右边的是低位,最左边的是高位,即:</li></ul><p><img src="/c/assets/20.CkykpHY2.png" alt=""></p><h3 id="_3-3-2-二进制和十进制的转换" tabindex="-1">3.3.2 二进制和十进制的转换 <a class="header-anchor" href="#_3-3-2-二进制和十进制的转换" aria-label="Permalink to &quot;3.3.2 二进制和十进制的转换&quot;"></a></h3><h4 id="_3-3-2-1-二进制转换为十进制" tabindex="-1">3.3.2.1 二进制转换为十进制 <a class="header-anchor" href="#_3-3-2-1-二进制转换为十进制" aria-label="Permalink to &quot;3.3.2.1 二进制转换为十进制&quot;"></a></h4><ul><li>规则:从最低位开始,将每个位上的数提取出来,乘以 2 的 (位数 - 1 )次方,然后求和。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① 在学术界,将这种计算规则,称为<code>位权相加法</code></li><li><code>八进制转换为十进制</code><code>十六进制转换为十进制</code><code>二进制转换为十进制</code>的算法相同!!!</li></ul></div><ul><li>示例:十进制转十进制</li></ul><p><img src="/c/assets/21.DV1YbrOP.png" alt=""></p><ul><li>示例:二进制转十进制</li></ul><p><img src="/c/assets/22.AHNJT9TV.png" alt=""></p><h4 id="_3-3-2-2-十进制转换二进制" tabindex="-1">3.3.2.2 十进制转换二进制 <a class="header-anchor" href="#_3-3-2-2-十进制转换二进制" aria-label="Permalink to &quot;3.3.2.2 十进制转换二进制&quot;"></a></h4><ul><li>规则:将该数不断除以 2 ,直到商为 0 为止,然后将每步得到的余数倒过来,就是对应的二进制。</li></ul><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p></p><ul><li>① 在学术界,将这种计算规则,称为<code>短除法</code><code>连续除2取余法</code></li><li>② 很好理解,只有不断地除以 2 ,就能保证最大的数字不超过 2 ,这不就是二进制(只能有 0 或 1</li><li><code>八进制转换为二进制</code><code>十六进制转换为二进制</code><code>十进制转换为二进制</code>的算法相同!!!</li></ul></div><ul><li>示例:十进制转十进制</li></ul><p><img src="/c/assets/23.Bs-MOwx2.png" alt=""></p><ul><li>示例:十进制转二进制</li></ul><p><img src="/c/assets/24.StzjmBz-.png" alt=""></p><h3 id="_3-3-3-二进制转八进制" tabindex="-1">3.3.3 二进制转八进制 <a class="header-anchor" href="#_3-3-3-二进制转八进制" aria-label="Permalink to &quot;3.3.3 二进制转八进制&quot;"></a></h3><ul><li><p>规则:每 3 位二进制就是一个八进制。</p></li><li><p>示例011 101 001 -&gt; 351</p></li></ul><p><img src="/c/assets/25.C0wVWaxD.png" alt=""></p><h3 id="_3-3-4-二进制转十六进制" tabindex="-1">3.3.4 二进制转十六进制 <a class="header-anchor" href="#_3-3-4-二进制转十六进制" aria-label="Permalink to &quot;3.3.4 二进制转十六进制&quot;"></a></h3><ul><li><p>规则:每 4 位二进制就是一个十六进制。</p></li><li><p>示例1110 1001 -&gt; 0xE9</p></li></ul><p><img src="/c/assets/26.LXJMAihe.png" alt=""></p><h2 id="_3-4-原码、反码和补码" tabindex="-1">3.4 原码、反码和补码 <a class="header-anchor" href="#_3-4-原码、反码和补码" aria-label="Permalink to &quot;3.4 原码、反码和补码&quot;"></a></h2><h3 id="_3-4-1-概述" tabindex="-1">3.4.1 概述 <a class="header-anchor" href="#_3-4-1-概述" aria-label="Permalink to &quot;3.4.1 概述&quot;"></a></h3><ul><li>机器数一个数在计算机的存储形式是二进制我们称这些二进制数为机器数。机器数可以是有符号的用机器数的最高位来存放符号位0 表示正数1 表示负数。</li></ul><p><img src="/c/assets/27._UTCq3PD.png" alt=""></p><ul><li>真值:因为机器数带有符号位,所以机器数的形式值不等于其真实表示的值(真值),以机器数 1000 0001 为例,其真正表示的值(首位是符号位)为 -1而形式值却是 129 ,因此将带有符号位的机器数的真正表示的值称为机器数的真值。</li></ul><p><img src="/c/assets/28.BjQ5kBL-.png" alt=""></p><h3 id="_3-4-2-原码" tabindex="-1">3.4.2 原码 <a class="header-anchor" href="#_3-4-2-原码" aria-label="Permalink to &quot;3.4.2 原码&quot;"></a></h3><ul><li>原码的表示与机器数真值表示的一样,即用第一位表示符号,其余位表示数值。</li><li>规则: <ul><li>正数的<code>原码</code>是它本身对应的二进制数,符号位是 0 。</li><li>负数的<code>原码</code>是它本身绝对值对应的二进制数,但是符号位是 1 。</li></ul></li><li>+1 的原码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的原码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>按照原码的规则,会出现 <code>+0</code><code>-0</code> 的情况,即:<code>0</code>000 0000+0<code>1</code>000 0000-0显然不符合实际情况所以计算机底层虽然存储和计算的都是二进数但显然不是原码。</p></div><h3 id="_3-4-3-反码" tabindex="-1">3.4.3 反码 <a class="header-anchor" href="#_3-4-3-反码" aria-label="Permalink to &quot;3.4.3 反码&quot;"></a></h3><ul><li><p>规则:</p><ul><li>正数的反码和它的原码相同。</li><li>负数的反码是在其原码的基础上,符号位不变,其余各位取反。</li></ul></li><li><p>+1 的反码,使用 8 位二进数来表示,就是:</p></li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的反码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td></tr></tbody></table><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><p>按照反码的规则,如果是 <code>+0</code>,对应的原码是 <code>0</code>000 0000那么其反码还是 <code>0</code>000 0000 ;如果是 <code>-0</code>,对应的原码是 <code>1</code>000 0000其反码是 <code>1</code>111 1111显然不符合实际情况所以计算机底层虽然存储和计算的都是二进数但显然不是反码。</p></div><h3 id="_3-4-4-补码" tabindex="-1">3.4.4 补码 <a class="header-anchor" href="#_3-4-4-补码" aria-label="Permalink to &quot;3.4.4 补码&quot;"></a></h3><ul><li><p>规则:</p><ul><li>正数的补码和它的原码相同。</li><li>负数的补码是在其反码的基础上 + 1 。</li></ul></li><li><p>+1 的补码,使用 8 位二进数来表示,就是:</p></li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th><th>补码8位二进制数</th></tr></thead><tbody><tr><td>+1</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td><td><code>0</code>000 0001</td></tr></tbody></table><ul><li>-1 的补码,使用 8 位二进数来表示,就是:</li></ul><table tabindex="0"><thead><tr><th>十进制数</th><th>原码8位二进制数</th><th>反码8位二进制数</th><th>补码8位二进制数</th></tr></thead><tbody><tr><td>-1</td><td><code>1</code>000 0001</td><td><code>1</code>111 1110</td><td><code>1</code>111 1111</td></tr></tbody></table><ul><li>如果 0 ,按照 <code>+0</code> 的情况进行处理,即:</li></ul><p><img src="/c/assets/29.COIOzcmT.png" alt=""></p><ul><li>如果 0 ,按照 <code>-0</code> 的情况进行处理,即:</li></ul><p><img src="/c/assets/30.Cu__mjav.png" alt=""></p><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p></p><ul><li>① 补码表示法解决了<code>原码</code><code>反码</code>存在的<code>两种</code>零(<code>+0</code><code>-0</code>)的问题,即:在补码表示法中,只有<code>一个</code>零,即 0000 0000。</li><li>②补码使得``加法运算<code></code>减法运算<code>可以统一处理,通过将减法运算</code>转换`为加法运算,可以简化硬件设计,提高了运算效率。</li><li>③ 计算机底层<code>存储</code><code>计算</code>的都是<code>二进数的补码</code></li></ul></div><h3 id="_3-4-5-总结" tabindex="-1">3.4.5 总结 <a class="header-anchor" href="#_3-4-5-总结" aria-label="Permalink to &quot;3.4.5 总结&quot;"></a></h3><ul><li>① 正数的原码、反码和补码都是一样的,三码合一。</li><li>② 负数的反码是在其原码的基础上按位取反0 变 1 1 变 0 ),符号位不变;负数的补码是其反码 + 1 。</li><li>③ 0 的补码是 0 。</li></ul><h2 id="_3-5-计算机底层为什么使用补码" tabindex="-1">3.5 计算机底层为什么使用补码? <a class="header-anchor" href="#_3-5-计算机底层为什么使用补码" aria-label="Permalink to &quot;3.5 计算机底层为什么使用补码?&quot;"></a></h2><ul><li>如果计算是 <code>2 - 2</code> ,那么可以转换为 <code>2 + (-2)</code>,这样计算机内部在处理<code>减法计算</code>的时候,就会将其转换为<code>加法计算</code>的形式,以简化硬件设计和提高计算效率。</li><li><code>最高位</code>表示<code>符号位</code>,由于符号位的存在,如果使用<code>原码</code>来计算,就会导致<code>计算结果不正确</code>,即:</li></ul><p><img src="/c/assets/31.BX_KzkHt.png" alt=""></p><ul><li><code>补码</code>的设计可以巧妙的让<code>符号位</code>也参与计算,并且可以得到<code>正确的计算结果</code>,即:</li></ul><p><img src="/c/assets/32.COt_QxSP.png" alt=""></p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-d4a0bba5><!--[--><!--]--><div class="edit-info" data-v-d4a0bba5><!----><div class="last-updated" data-v-d4a0bba5><p class="VPLastUpdated" data-v-d4a0bba5 data-v-7e05ebdb>上次更新: <time datetime="2024-07-15T07:37:53.000Z" data-v-7e05ebdb></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d4a0bba5><span class="visually-hidden" id="doc-footer-aria-label" data-v-d4a0bba5>Pager</span><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link prev" href="/c/notes/01_c-basic/01_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>上一篇</span><span class="title" data-v-d4a0bba5>C 语言入门</span><!--]--></a></div><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link next" href="/c/notes/02_dsa/01_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>下一篇</span><span class="title" data-v-d4a0bba5>初识 C 语言</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024 许大仙</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"notes_index.md\":\"CdHKXnBk\",\"index.md\":\"uFk6fSzW\",\"notes_01_c-basic_02_xdx_index.md\":\"B3MGlUHH\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>

View File

@ -8,10 +8,10 @@
<meta name="generator" content="VitePress v1.2.3">
<link rel="preload stylesheet" href="/c/assets/style.bTUc_nQv.css" as="style">
<script type="module" src="/c/assets/app.DJvpVQC4.js"></script>
<script type="module" src="/c/assets/app.C14JyXvG.js"></script>
<link rel="preload" href="/c/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/c/assets/chunks/framework.BE8if9e6.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.C4MahGFn.js">
<link rel="modulepreload" href="/c/assets/chunks/theme.D3Q79mSr.js">
<link rel="modulepreload" href="/c/assets/notes_index.md.CdHKXnBk.lean.js">
<link rel="shortcut icon" href="/c//logo.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,shrink-to-fit=no">
@ -21,7 +21,7 @@
</head>
<body>
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar top" data-v-ae24b3ad data-v-ccf7ddec><div class="wrapper" data-v-ccf7ddec><div class="container" data-v-ccf7ddec><div class="title" data-v-ccf7ddec><div class="VPNavBarTitle has-sidebar" data-v-ccf7ddec data-v-ab179fa1><a class="title" href="/c/" data-v-ab179fa1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/c/logo.svg" alt data-v-8426fc1a><!--]--><span data-v-ab179fa1>许大仙</span><!--[--><!--]--></a></div></div><div class="content" data-v-ccf7ddec><div class="content-body" data-v-ccf7ddec><!--[--><!--]--><div class="VPNavBarSearch search" data-v-ccf7ddec><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-ccf7ddec data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/coa6/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>计组6件套</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/c/notes/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>c/c++</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/web-design/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>前端</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/java/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Java</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/big-data/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>大数据</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/linux/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>云原生</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://aexiar.github.io/open-software/notes/" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>开源软件</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-ccf7ddec data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-ccf7ddec data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Aurorxa" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-ccf7ddec data-v-d0bd9dde data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-b6c34ac9><span class="vpi-more-horizontal icon" data-v-b6c34ac9></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-d0bd9dde><div class="item appearance" data-v-d0bd9dde><p class="label" data-v-d0bd9dde>Appearance</p><div class="appearance-action" data-v-d0bd9dde><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-d0bd9dde data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div></div></div><div class="group" data-v-d0bd9dde><div class="item social-links" data-v-d0bd9dde><div class="VPSocialLinks social-links-list" data-v-d0bd9dde data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Aurorxa" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-ccf7ddec data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-ccf7ddec><div class="divider-line" data-v-ccf7ddec></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-17a5e62e><button data-v-17a5e62e>返回顶部</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-575e6a36><div class="curtain" data-v-575e6a36></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-575e6a36><span class="visually-hidden" id="sidebar-aria-label" data-v-575e6a36> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>C 语言基础</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/01_c-basic/01_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>C 语言入门</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/01_c-basic/02_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>变量和进制</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>C 语言高级</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/02_dsa/01_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>初识 C 语言</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>C++ 核心编程</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/03_coa/03_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>计算机组成原理前言</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>C++ 标准库</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/03_coa/03_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>计算机组成原理前言</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>QT 桌面开发</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/04_os/01_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>操作系统前言</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>Linux 高并发服务器开发</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-b8d55f3b><span class="vpi-chevron-right caret-icon" data-v-b8d55f3b></span></div></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/c/notes/04_os/01_xdx/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>操作系统前言</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>目录</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _c_notes_" data-v-39a288b8><div><h1 id="计算机基础知识" tabindex="-1">计算机基础知识 <a class="header-anchor" href="#计算机基础知识" aria-label="Permalink to &quot;计算机基础知识&quot;"></a></h1><hr><iframe src="https://roadmap.sh/r/embed?id=668c68522c7edd3e44893630" width="115%" height="500px" frameBorder="0"></iframe></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-d4a0bba5><!--[--><!--]--><div class="edit-info" data-v-d4a0bba5><!----><div class="last-updated" data-v-d4a0bba5><p class="VPLastUpdated" data-v-d4a0bba5 data-v-7e05ebdb>上次更新: <time datetime="2024-07-11T08:05:05.000Z" data-v-7e05ebdb></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d4a0bba5><span class="visually-hidden" id="doc-footer-aria-label" data-v-d4a0bba5>Pager</span><div class="pager" data-v-d4a0bba5><!----></div><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link next" href="/c/notes/01_c-basic/01_xdx/" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>下一篇</span><span class="title" data-v-d4a0bba5>C 语言入门</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024 许大仙</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"uFk6fSzW\",\"notes_index.md\":\"CdHKXnBk\",\"notes_01_c-basic_02_xdx_index.md\":\"CB8oZG6k\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"notes_index.md\":\"CdHKXnBk\",\"index.md\":\"uFk6fSzW\",\"notes_01_c-basic_02_xdx_index.md\":\"B3MGlUHH\",\"notes_01_c-basic_01_xdx_index.md\":\"DA3nuW_4\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"许大仙\",\"titleTemplate\":\"Hi终于等到你\",\"description\":\"许大仙前端、Java、大数据、云原生\",\"base\":\"/c/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"returnToTopLabel\":\"返回顶部\",\"search\":{\"provider\":\"local\"},\"logo\":\"/logo.svg\",\"nav\":[{\"text\":\"首页\",\"link\":\"https://aexiar.github.io/\"},{\"text\":\"计组6件套\",\"link\":\"https://aexiar.github.io/coa6/notes/\"},{\"text\":\"c/c++\",\"link\":\"/notes/\"},{\"text\":\"前端\",\"link\":\"https://aexiar.github.io/web-design/notes/\"},{\"text\":\"Java\",\"link\":\"https://aexiar.github.io/java/notes/\"},{\"text\":\"大数据\",\"link\":\"https://aexiar.github.io/big-data/notes/\"},{\"text\":\"云原生\",\"link\":\"https://aexiar.github.io/linux/notes/\"},{\"text\":\"开源软件\",\"link\":\"https://aexiar.github.io/open-software/notes/\"}],\"sidebar\":{\"/notes/\":[{\"text\":\"C 语言基础\",\"collapsed\":true,\"items\":[{\"text\":\"C 语言入门\",\"link\":\"/notes/01_c-basic/01_xdx/\"},{\"text\":\"变量和进制\",\"link\":\"/notes/01_c-basic/02_xdx/\"}]},{\"text\":\"C 语言高级\",\"collapsed\":true,\"items\":[{\"text\":\"初识 C 语言\",\"link\":\"/notes/02_dsa/01_xdx/\"}]},{\"text\":\"C++ 核心编程\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"C++ 标准库\",\"collapsed\":true,\"items\":[{\"text\":\"计算机组成原理前言\",\"link\":\"/notes/03_coa/03_xdx/\"}]},{\"text\":\"QT 桌面开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]},{\"text\":\"Linux 高并发服务器开发\",\"collapsed\":true,\"items\":[{\"text\":\"操作系统前言\",\"link\":\"/notes/04_os/01_xdx/\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Aurorxa\"}],\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024 许大仙\"},\"outline\":{\"level\":[1,6],\"label\":\"目录\"},\"outlineTitle\":\"当前页大纲\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>