SlideShare a Scribd company logo
1 of 11
Binära och Hexadecimala tal i datorn
Talsystem på olika platser
 Olika talsystem för olika tillfällen
 Binära (datorer)
 Decimala (vardaglig)
 Hexadecimala (färger, programmering)
HUR FUNGERAR DÅ TALSYSTEM
Decimala talsystemet
 10st olika siffror (bas 10)
 Bygger upp alla tal
 Multipel av 10
Ex. 132= 1x100 + 3x10 + 2x1
4297=4x1000 + 2x100 + 9x10 + 7x1
Matematisk generalisering
Binära Talsystemet
Räkna med binära tal
Räkna med binära tal
 Multiplikation
0*0=0
1*0=0
0*1=0
1*1=1
Ex. 1011
1001
1100011
Hexadecimala tal
Konvertera tal mellan system
Konvertera tal mellan system
Konvertera tal mellan system

More Related Content

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Talsystem

Editor's Notes

  1. Olika talsystem är bra att använda vid olika tillfällen. Binära talsystemet används i datorers hårdvara då dessa inte kan tolka större tal. Det decimala talsystemet är det som används vanligtvis och det vi använder oss varje dag. Hexadecimala talsystemet som en utökning utav det binära, används mycket för att beskriva färger i datorn.
  2. Vi har tio stycken olika siffror i det deciamala talsystemet, 0-9 Detta brukar kallas att talet har en ”bas” 10 Med dessa tio siffror kan vi bygga upp alla tal från 0 till inf När ett tal större än nio skall skrivas så behövs en multipel. I det decimala talsystemet används en multipel av 10 för att skapa större tal. T.ex 10,100,100 etc. Vi tittar på talet 132 och bryter upp det i tal mellan 0-9 som multipliceras med multiplar utav 10. Det finns 1 hundratal, 3 tiotal och 2 ental. På samma sätt kan vi dela upp 4297 i 4 tusental, 2 hundratal, 9 tiotal och 7 ental. Och så vidare för alla tal vi kan tänkas använda.
  3. När vi nu börjat förstå hur olika tal byggs upp i det decimala talsystemet med hjälp utav multiplar av 10 är det dags att generalisera modellen och se till att det går att använda den inom andra talsystem. Återigen kollar vi på talet 132 och delar upp det på precis samma sätt, men nu skriver vi om det på annan form. Här ser vi 10^2 =100, 10^1=10 och 10^0. Vi ser här begynnelsen till en generell form för olika talsystem. Det är nu fullt möjligt att byta ut 10 mot vilket tal som helst. På raden under syns hur talet skulle skrivits med bas 9 istället för bas 10. Samt att vi ser hur detta skulle utläsas.
  4. Binära talsystemet använder bara 2 stycken siffror, 1 och 0. När hårdavara programmeras till datorer så används binära tal, där 1 symboliserar på och 0 symboliserar av. Vi använder samma idé nu som förut kring hur vi räknar ut värdet. Det börjar med 2^0 för siffran längst till höger, sedan 2^1 och ökar med 1 för varje steg åt vänster vi går.
  5. Addition fungerar precis som inom decimala talsystemet, med den enda skillnaden att det bara finns 0 och att räkna med. I exemplet ser vi hur 1+1 ger en nolla och att sedan en etta bärs med till vänster, samma sak med andra siffran. Fast där finns också ettan som burits med sedan tidigare som sätts in.
  6. Multiplikation fungerar precis som vi decimal multiplikation. Enklaste sättet att göra det på är att ställa upp talen som när man lärde sig decimalt. Sedan är det bara att lära sig binära multiplikationstabellen. Där det bara finns fyra olika saker som kan hända.
  7. Hexadecimala talsystemet använder sig av 16 symboler för att representera tal Har inte fler siffror utan använder 0-9 och använder bokstäverna A-F. Inom programmering används hexadecimala tal för att förenkla sifferhantering för programmerare. Används på programmering som är nära hårdvaruprogrammering. Och sist på sidan ser vi hur detta appliceras på ett tal skrivet i hexadecimal form. Och sedan omskriven på med en decimal multiplikation
  8. När man hamnar i läget att man kan behöva räkna med flera olika talbaser så är det viktigt att skriva ut vilken talbas varje tal är skriven i. Detta görs genom att man precis efter talet lägger till ett index, med vilken bas som talet är skrivet i. Exemplet visar hur 101 i binära systemet blir 5 i det decimala. Vi ser också hur hur 1E i hexadecimala blir 30 decimalt. Och även hur det ser ut mellan binärt och hexadecimalt
  9. När man skall konvertera ett tal på decimal form till binär form så finns det inte något enkelt knep, utan det är helt enkelt rakt på som gäller. Hitta största binära multipel som kan subtraheras från talet. I exemplet kan vi börja med att subtrahera 64, då nästa tal 128 skulle vara större än 123. Sedan tar vi bort 32,16 och 8. Nästa tal vi kunde tagit bort skulle vara 4. Men 3 är mindre än 4 vilket gör att vi inte kan subtrahera 4. Istället subtraheras 2 och 1 för att få 0. Nu kommer själva konverteringen. Alla tal som subtraherat bort från talet representerar en siffra i det binära talet. Här kommer vi alltså få det binära talet 111011 Detta är den metod som allt som oftast måste användas för att konvertera tal mellan olika talbaser.
  10. Undantaget från föregående metod är när tal skall konverteras mellan binära och hexadecimala tal. Regeln är att för varje tecken som används i det hexadecimala så används fyra binära