DATA REPRESENTATION
Very Short answer Type Questions
Q.1 Add
the binary numbers (a) 110101 and 101111 (b)
10110 and 1101
Ans:
(a) 1100100 (b) 100011
Q.2 Convert 111110111101012
to octal.
Ans: 37365
Q.3
Covert
the following binary numbers to decimal
-
(a)1010 (b) 111000 (c) 10101111 (d) 10110
Ans: (a) 10 (b)
56 (c)
175 (d)
22
Q.4
Covert
the following Decimal numbers to binary
-
(a) 23
(b)
100 (c)
161 (d)
145
Ans: (a) 10111 (b) 1100100 (c) 10100001 (d)
10010001
Q.5 Covert the following Hexadecimal numbers to
Binary -
(a) BE (b) BC9 (c) A07 (d) 7AB4
Ans:
(a)10111110 (b) 101111001001 (c) 101000000111 (d) 0111101010110100
Q.6
Covert
the following binary numbers to Hexadecimal -
(a)101000001 (b) 11100011 (c)
10101111 (d)
101101111
Ans: (a) 141 (b) E3
(c)
AF (d)16F
Q.7
Covert
the following Octal numbers to Binary -
(a) 456 (b) 26 (c) 751 (d)
777
Ans: (a) 100101110 (b) 010110 (c) 111101001 (d)111111111
Q.8
Convert the following:
(a) 4468 to ( )16
(b) 47.58 to ( )10 (c)
45.910 to ( )2
Ans: (a) 126 (b) 39.625 (c) 101101.1110
Short Answer Type
Questions Q.1 What is the use of
encoding schemes?
Ans: A character encoding provides a key to unlock (ie. crack) the
code. It is a set of mappings between the bytes in the computer and the
characters in the character set. Without the key, the data looks like garbage.
So, when you input text
using a keyboard or in some other way, the character encoding maps characters
you choose to specific bytes in computer memory, and then to display the text
it reads the bytes back into characters. Unfortunately, there are many different
character sets and character encodings, ie. many different ways of mapping
between bytes, code points and characters. The section Additional
information provides
a little more detail for those who are interested.
Q.2 Discuss UTF-8 encoding
Scheme.
Ans: UTF-8 is a compromise character encoding that can be as
compact as ASCII (if the file is just plain English text) but can also contain
any unicode characters (with some increase in file size). UTF stands for
Unicode Transformation Format. The '8' means it uses 8-bit blocks to represent
a character.
Q.3 How UTF-8 encoding scheme
different from UTF-32 encoding scheme?
Ans: UTF-8: Variable-width encoding, backwards compatible with
ASCII. ASCII characters (U+0000 to U+007F) take 1 byte, code points U+0080 to
U+07FF take 2 bytes, code points U+0800 to U+FFFF take 3 bytes, code points
U+10000 to U+10FFFF take 4 bytes. Good for English text, not so good for Asian
text.
UTF-32 uses 32-bit values for each character. That allows them to
use a fixed-width code for every character. UTF-32 is opposite, it
uses the most memory (each character is a fixed 4 bytes wide), but on the other
hand, you know that every character
has this precise length, so string manipulation becomes far simpler. You can
compute the number of characters in a string simply from the length in bytes of
the string. You can't do that with UTF-8. Q.4
What are ASCII and extended ASCII schemes?
Ans: The standard ASCII character set uses just 7 bits for each character. There
are several larger character sets that
use 8 bits, which gives them 128 additional characters. The extra characters
are used to represent non-English characters, graphics symbols, and mathematical
symbols.
The extended ASCII character set uses 8
bits, which gives it an additional 128 characters. The extra characters
represent characters from foreign languages and special symbols for
drawing pictures.
Q.5 What is the utility of
ISCII encoding schemes?
ISCII is a bilingual
character encoding (not glyphs) scheme. Roman characters and punctuation marks
as defined in the standard lower-ASCII take up the first half the character set
(first 128 slots). Characters for indie languages are allocated to the upper
slots (128-255). T Q.6 What is Unicode?
What is its significance?
Ans: Unicode is a character encoding standard that has widespread
acceptance. Microsoft software
uses Unicode at its core. Whether you
realize it or not, you are using Unicode already! Basically, ―computers just
deal with numbers. They store letters and other characters by assigning a
number for each one. Before Unicode was invented, there were hundreds of
different encoding systems for assigning these numbers. No single encoding
could contain enough characters.1‖ This
has been the problem we, in SIL, have often run into. If you are using a legacy
encoding your font conflicts with the font someone in another area of the world
uses. You might have an in your font
while someplace else someone used a at
the same codepoint. Your files are incompatible. Unicode provides a unique
number for every character and so you do not have this problem if you use
Unicode. If your document calls for U+0289 it will be clear
to any computer program what the character should be
Q.7 What are ASCII and
ISCII? Why are these used?
Ans: ASCII uses a 7-bit encoding and ISCII uses an 8-bit which is
an extension of ASCII. These are encoding schemes to represent
character set in s computer system.
Q.8
Compare UTF-8 and UTF-32 encoding schemes. Which one is most popular
scheme?
Ans: UTF-8: Variable-width encoding, backwards compatible with
ASCII. ASCII characters (U+0000 to U+007F) take 1 byte, code points U+0080 to
U+07FF take 2 bytes, code points U+0800 to U+FFFF take 3 bytes, code points
U+10000 to U+10FFFF take 4 bytes. Good for English text, not so good for Asian
text.
UTF-32 uses 32-bit values for each character. That allows them to
use a fixed-width code for every character. UTF-32 is opposite, it
uses the most memory (each character is a fixed 4 bytes wide), but on the other
hand, you know that every character
has this precise length, so string manipulation becomes far simpler. You can
compute the number of characters in a string simply from the length in bytes of
the string. You can't do that with UTF-8. Q.9
What do you understand by code point and code unit?
Ans:
A code point is the atomic unit of information. ... Each code point is a
number which is given meaning by the Unicode standard. A code unit is the unit
of storage of a part of an encoded code point. In UTF-8 this means 8-bits, in
UTF-16 this means 16-bits. Q.10 What is
code space? How is it related to code point?
Ans: In computing, Code space may refer to: In memory address
space: code space, where machine code is stored. For a character encoding: code
space (or code space), the range of code points.
0 comments:
Post a Comment
Thanks for leaving a comment. As soon as it's approved, it will appear.