Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2018-BKSC-ALU
Search
houmei
March 06, 2018
Technology
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2018-BKSC-ALU
ぼくのかんがえたさいきょうCPU 2018 ALU
houmei
March 06, 2018
More Decks by houmei
See All by houmei
ぼくのかんがえたさいきょうCPU 2018 ベクトル演算
houmei
0
180
ぼくのかんがえたさいきょうCPU 2018 スカラ演算
houmei
0
160
ぼくのかんがえたさいきょうCPU 2018 DATA
houmei
0
160
2017 CPU Architeciture
houmei
0
320
Other Decks in Technology
See All in Technology
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
430
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
380
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
110
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
870
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
210
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
100
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Thoughts on Productivity
jonyablonski
76
5.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
A Soul's Torment
seathinner
8
3.8k
RailsConf 2023
tenderlove
30
1.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
WCS-LA-2024
lcolladotor
0
890
Transcript
΅͘ͷ͔Μ͕͑ͨ ͍͖͞ΐ͏CPU 2018.3.6 @houmei ALU
༰ • ΅͘ͷ͔Μ͕͍͖͑ͨ͞ΐ͏CPUͷղઆ • ཧԋࢉஔ(ALU)ʹ͍ͭͯ twitter : @houmei blog :
ԼੈքౝͷܭࢉػΑ·
ALUͷߏ
ALUͷೖग़ྗ(1) • Ra,Rb(,Rb’...) σʔλೖྗ • Rc ԋࢉछྨͷࢦࣔ • Rd ԋࢉ݁Ռग़ྗ
• Re ԋࢉ݁Ռ༧උग़ྗ • Rf ԋࢉ݁Ռϑϥά
ALUͷೖग़ྗ(2) • ೖྗRa,Rbͱग़ྗRd,Reಉ͡bit෯ • 3Ҿͷԋࢉ(ੵԋࢉͳͲ)Rb’Λ༻ • ࢉͷ݁Ռ2ഒͷbit෯ʹͳΔͷͰRd,Reʹ ग़ྗ • আࢉͷRdʹɺ༨Reʹग़ྗ
ALUͷೖग़ྗ(3) • RcԋࢉͷछྨɺؙΊͳͲΛࢦఆɻ8bit෯ • Rfԋࢉ݁Ռͷঢ়ଶΛग़ྗɻ8bit෯ • ݅ذ໋ྩલͷԋࢉ໋ྩͷRfΛࢀর͢Δ
ԋࢉͷछྨ • ࢉज़ԋࢉɹRa,Rb,Rd,Re(/ුಈখ) • ཧԋࢉɹRa,Rb,Rdbitྻ(Reແޮ) • bitૢ࡞ɹRabitྻɺRbɺRdbitྻɹɹ ―γϑτ໋ྩͳͲ • bitใɹRabitྻɺ(Rbɺ)Rdɹ
―POPC໋ྩͳͲ
ࢉज़ԋࢉ • Ճࢉ/ݮࢉ • ࢉ/ੵԋࢉ • আࢉ/ฏํࠜ • ઈର/ූ߸స •
࠷େ/࠷খ
ཧԋࢉ • RaͱRbͷAND/OR/XOR • Raͷస(NOT) • Ra/Rb/all0ͷબ • ग़ྗͷస(NOT)ɹɹɹɹɹɹɹɹɹɹɹɹɹ ―͜ΕͰͯ͢ΧόʔͰ͖Δ
Ϗοτૢ࡞ • ӈγϑτ/ࠨγϑτ/ࢉज़ӈγϑτ/ࠨճసɹ ―RbྔΛࢦఆ • INSERT/EXTRACTɹɹɹɹɹɹɹɹɹɹɹ ―RbҐஔΛࢦఆ • bitSwapɹ8bitͰҙbitͷೖΕ͑ɹɹɹɹ ―RbύλʔϯΛࢦఆ
Ϗοτใ • POPCɹRaͷ“1”ͷΛΧϯτ • CLZ Count Leading Zero MSB͔Β࿈ଓ͢Δ0ͷ •
CTZ Count Trairing Zero LSB͔Β࿈ଓ͢Δ0ͷ
ϑϥά • ԋࢉ݁Ռͷঢ়ଶΛࣔ͢ • Φʔόʔϑϩʔͷ༗ແ • ݮࢉ࣌ͷRa,Rbͷେখؔɹ→ޙͷذ໋ྩ • ҾͷΤϥʔ(γϑτ໋ྩͷγϑτྔ͕ුಈখ)
ɹ ͭͮ͘ ΅͘ͷ͔Μ͕͍͖͑ͨ͞ΐ͏CPU