CN1039907A - Lunar calendar arithmetic unit - Google Patents

Lunar calendar arithmetic unit Download PDF

Info

Publication number
CN1039907A
CN1039907A CN 89104427 CN89104427A CN1039907A CN 1039907 A CN1039907 A CN 1039907A CN 89104427 CN89104427 CN 89104427 CN 89104427 A CN89104427 A CN 89104427A CN 1039907 A CN1039907 A CN 1039907A
Authority
CN
China
Prior art keywords
day
accumulation
data
lunar calendar
month
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 89104427
Other languages
Chinese (zh)
Inventor
広富谆
堀口勝弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Instruments Inc
Original Assignee
Seiko Instruments Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Instruments Inc filed Critical Seiko Instruments Inc
Publication of CN1039907A publication Critical patent/CN1039907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G9/00Visual time or date indication means
    • G04G9/0076Visual time or date indication means in which the time in another time-zone or in another city can be displayed at will
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/03Digital function generators working, at least partly, by table look-up
    • G06F1/035Reduction of table size
    • G06F1/0356Reduction of table size by using two or more smaller tables, e.g. addressed by parts of the argument

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Electric Clocks (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a kind of small and exquisite lunar calendar arithmetic unit that calculates lunar calendar according to solar calendar rapidly, it comprises the date storage device, the complex data memory storage, the first accumulation day calculation element, the first accumulation day memory storage of the accumulation day that storage is calculated, the lunation calculation element, lunar month memory storage, the second accumulation day calculation element, the second accumulation day memory storage of the accumulation day that storage is calculated, comparison means, lunar calendar calculation element, and the lunar calendar memory storage of storing resulting lunation and day data.

Description

Lunar calendar arithmetic unit
The present invention relates to can displaying calendar pocket-size electronic information equipment or electronic watch, particularly be used for information equipment or electronic watch, can calculate the calendar arithmetic unit of lunar calendar and ROKUYO according to solar calendar.
In Japan and other Asian countries, use lunar calendar and ROKUYO in daily life sometimes.ROKUYO is based upon on the lunar calendar basis, by Taian, and Shakko, Sensho, Tomobiki, Senpu and Butsumetsu form.
About the information of lunar calendar and ROKUYO can only be by calendar, obtain in other things of document and special printing this type of information, yet, this calendar, the thing inconvenience of document and the like is carried, and is therefore not too practical.
Therefore, calculate the time meter of lunar calendar and ROKUYO according to solar calendar, electronic calculator and suchlike thing the Jap.P. spy open clear 149547/1984 and the Jap.P. spy open obtained in clear 18141/1979 open, yet, because the data that will store are so many, thereby the change of the size of equipment is big, and under the situation of equipment little (making CPU as adopting 4 microprocessor), the step of handling increases, thereby the cost long time carries out arithmetic operation.
Therefore, the objective of the invention is to provide a lunar calendar arithmetic unit, it can calculate lunar calendar according to solar calendar more quickly, and its volume of comparing with conventional apparatus is compacter, smaller and more exquisite.
Purpose of the present invention realizes that by a lunar calendar arithmetic unit this device comprises:
Data processing equipment is used to store the data message of year, month, day;
The complex data memory storage, in order to crescent annual in the time of storing predetermined number first day, information and the moon piece of data that starts from this lunar calendar of first day that (being called first day later on) is relevant, originate in one month sky logarithmic data of last lunar calendar of first day of last one year, and the data relevant certain month whether be the leap month, originate in certain year each lunar calendar of first day one month sky logarithmic data and the leap month data;
The first accumulation day calculation element, according to be stored in the described day access to storage device certain year the earliest first day information and by one month the fate information that is stored in each lunar calendar that began to calculate in first day in the described fate memory storage, as " 1 ", obtain first day accumulation day with first day of certain year January.
The first accumulation day memory storage is used for storage accumulation day;
The lunation calculation element, information according to from the relevant month information of the lunar calendar that began to calculate in first day the earliest in certain year and from one month of each first day initial lunar calendar relevant the leap month is calculated which month that each belonged to lunar calendar in first day;
Memory storage is used to store the lunar month of being calculated;
A second accumulation day calculation element calculates accumulation day with first day of certain year in data storage device January as " 1 ";
Second accumulation day memory storage is used to store the accumulation day of being calculated;
Comparison means, the earliest first day from certain year, first accumulation that is stored in the first accumulation day memory storage day is compared successively with the second accumulation day that is stored in the second accumulation day memory storage, when the former during greater than the latter, correspondingly send a signal;
The lunar calendar calculation element, when comparison means produces signal, the an accumulation day before first accumulation day that will be used for comparison deducts from the second accumulation Japan and China, to subtract each other that the result adds " 1 " thereby a day of having obtained lunar calendar, and obtain and with the relevant synodic month data of accumulation day before first accumulation of making comparisons day; And
The lunar calendar memory storage is used to store a resulting lunation and day relevant data;
Lunar calendar arithmetic unit further comprises the ROKUYO calculation element, calculate ROKUYO(ROKUYO by " Taian " according to the lunar calendar data that are stored in the described lunar calendar memory storage, " Shakko ", " Sensho ", " Tomobiki ", " Senpu " and " Bufsumetsu " forms).
Lunar calendar arithmetic unit further comprises data correction, and it can be revised the data message that is stored in the described memory storage by external operation.
Lunar calendar arithmetic unit further comprises display device, and a lunation and day data that are stored in the described lunar calendar memory storage are shown.
Time of predetermined number is calculated the necessary information of lunar calendar handles and be stored in the ROM(ROM (read-only memory)) and such as components and parts in, the mode of being stored makes that the volume of storer is reduced, and determine to obtain the lunar time in 1 year when new, be sent to predetermined memory storage with the data of this yearly correlation, go out each accumulation day of first day in this year and from one month data of each first day initial lunar calendar according to handled data computation, and it is stored in the predetermined memory storage, obtain desired lunar calendar, to obtain first day accumulation day GD earlier as " 1 " with the January, accumulation day compares first day accumulation day of GD and each, this carries out more one by one up to this bigger situation of accumulation day of first day occurring, that accumulation day of first day before this bigger first day of day of accumulation deducts from accumulation day GD, to subtract each other the result and add 1 one day data that just obtained lunar calendar, can obtain month of lunar calendar by month data with the first day relevant lunar calendar that is used for subtraction, thereby, the ROKUYO that is attached to lunar calendar can be with the moon of lunar calendar and day addition again divided by obtaining in 6 remainders that produced.
Fig. 1 is a functional-block diagram of the present invention;
Fig. 2 (a) expression was an example with 1984 Christian eras, to first day data, and the explanation that the corresponding lunar calendar and the fate in each month of lunar calendar are done;
Fig. 2 (b) is illustrated in the synoptic diagram that the content of Fig. 2 (a) is written to the data processing of being done such as time in the memory storage of ROM;
Fig. 3 (a) is the synoptic diagram of the content in day access to storage device, and wherein the data that kept were corresponding to 1984.
Fig. 3 (b) is the synoptic diagram of a content in the fate memory storage, and wherein the data that kept were corresponding to 1984.
The synoptic diagram of content in the information-storing device leap month that Fig. 3 (c) being one, wherein the data that kept were corresponding to 1984.
Fig. 4 is the process flow diagram of an operational instances of the expression first accumulation day calculation element.
Fig. 5 is the process flow diagram of an operational instances of expression lunar calendar calculation element.
Fig. 6 (a) is the key diagram that expression is stored in the content in the first accumulation day memory storage.
Fig. 6 (b) be expression be stored in lunar month day the content in the memory storage key diagram.
Fig. 7 is the expression comparison means, the process flow diagram of an operational instances of lunar calendar calculation element and ROKUYO calculation element.
Present invention is described with regard to an embodiment with reference to the accompanying drawings.
Fig. 1 is the block scheme of an expression exemplary functions structure of the present invention, a complex data memory storage 120, for example, the ROM(ROM (read-only memory)), wherein give and having write earlier giving the earliest first day in fixed number every year in purpose time (being referred to as " the earliest first day " later on), originate in a month piece of data (below be referred to as " first lunar month ") of this lunar calendar of first day, originate in one month of last lunar calendar of first day the sky logarithmic data (below be referred to as " fate of last lunar month of last one year ") of last one year, the leap month information of this month (below be referred to as " the last leap month data of last one year "), originate in the fate (hereinafter referred to as " fate of lunar month ") of each first day lunar calendar each month in certain year, with and the leap month information (below be referred to as " leap month data ").
Switchgear 111 is controlled by an external switch 121, in order to determine still to calculate lunar calendar and ROKUYO by any established data according to calculating lunar calendar and ROKUYO by 101 determined present days of time set.
To be described at such a case below, calculate lunar calendar and ROKUYO according to the data that are stored in the data storage device 102 by switchgear 111.
According to the data in 1 year that are stored in the data storage device 102, canned data conversion equipment 119 by complex data memory storage 120 will be the earliest first day data and first lunar month data be transferred to day access to storage device 104, fate and the fate of first lunar month in this year of last lunar month of last one year are transferred to fate memory storage 105, and the data with last one year last leap month the and the leap month data in this year information-storing device 106 deliver to the leap month.
With 1984 be example, Fig. 2 show first day the relative lunar calendar of data the moon and day and every month fate, and show the situation that is stored in after these data are handled in the complex data memory storage 120.Because the fate by the lunar month that is drawn in the data processed only has only 30 days or 29 days two kinds of situations.Therefore, with 1 sky logarithmic data that just is enough to represent each lunar month, be about to conduct " 1 " in 30 days and conduct " 0 " in 29 days.Equally, if will with the leap month when irrelevant a lunar month the leap month information as " 1 ", and with the leap month relevant lunar month the leap month information as " 0 ", the leap month information of each lunar month also is enough to use 1 bit representation so.Therefore, compare with the situation of directly fate all being stored, the storage volume of the complex data memory storage 120 that the present invention is used requires much smaller.
When canned data conversion equipment 119, data are sent to day access to storage device 104, fate memory storage 105, the leap month information-storing device 106 after, content in these devices is shown in Fig. 3 (a) respectively, Fig. 3 (b), Fig. 3 (c) (with data instance in 1984).With first day of January in this year as " 1 ", according to first day data the earliest in the day access to storage device 104 and the sky logarithmic data in the fate memory storage 105, calculate accumulation day by first an accumulation day calculation element 107, and with the result of calculation sequential storage in the first accumulation day memory storage 108, respectively use Ti(i=0 below the resulting data this moment, 1,2 ...) expression.Fig. 4 is an operational instances process flow diagram in this case.
At first, the fates in this year are stored among the register DT in 401 steps, then, 402 steps will be the earliest deposited register T in first day, in 403 steps, with counter C zero setting.This first three step is carried out the initialization to this process.
After the initialization,, made comparisons in the count value of counter C and " 1 ", further compare with " 0 " in the count value of 405 step counter C in 404 steps.When the count value among the counter C equals " 0 ", check b 0Whether the position places " 1 ", if "Yes" deposits data register D in 30, if "No" then deposits data register D in 29.Then, in 409 steps, from the value of register T, deduct the value of register D, and deposit the result in register TD.In 405 steps, if the count value of counter C is not equal to " 0 ", in other words, Counter Value equals 1, so with register D zero setting, and with the value of register D and the value addition of register T, and deposits the result in register T.In 415 steps, deposit the content of register T in register TD.
In 404 steps,, check b(c-1 so if the count value of counter C neither is 0 also to be not equal to 1) whether the position is 1, if "Yes" deposits register D in 30, if "No" then deposits register D in 29.With the value of the value of register D and register T mutually adduction deposit the result in register T, then, the content of the register T register TD that restores.
In 416 steps, the content of register TD is deposited into the address C of the first accumulation day register with data Tc.In 417 steps, the value of register TD and the value of register DT are compared, if the value of register TD is greater than the value of register DT, the count value of counter C is subtracted 1 and deposit the result in register CN, if the values at 417 step TD are not more than the value of DT, the count value of counter C adds 1 so, and gets back to for the 404th step, so repeat, up to the value of register TD value greater than register DT.
Then, according in the day access to storage device 104 the 1st lunar month data and the leap month leap month data in the information-storing device 106, calculate the data of each month that originates in each lunar calendar of first day by lunation calculation element 109, and with its sequential storage in lunation memory storage 110.In the case, use KMi(i=0 respectively, 1,2 below the resulting data ...) expression, Fig. 5 is a process flow diagram of representing an operational instances in the case.
At first, counter C is put 0 in 501 steps, 502 steps with first lunar month data send into register KM, thereby to program initialization.In 503 steps, check whether the count value of counter C equals 0, if "Yes" deducts b with the value of register KM 1' and with the result register KM that restores, if "No" adds b with the value of register KM 1', its result deposits register KM in, and the value of register KM is with numerical value KM CForm deposits the address C of lunar month storer in.Then, check whether the count value of counter C equals the value of register CN, if "Yes", EOP (end of program).If "No" counter C adds 1, program flow returns to 503 step, so repeat, equal the value of register CN up to the value of counter C.
Every change 1 year, above process is only carried out once.The first accumulation day memory storage and lunar month memory storage content be shown in Fig. 6, each data is to be that example is resulting with 1984.
The second accumulation day calculation element 112, as " 1 ", calculate accumulation day with first day of January in this year by the selected date of switchgear 111 (year, month and day), result of calculation is stored in the second accumulation day memory storage 113, this moment accumulation day be referred to as GD.
Comparison means 114 will be stored in comparing with GD successively accumulation day in the first accumulation day memory storage 107, and when greater than GD, comparison means 114 produces a signal.Lunar calendar calculation element 115 receives the output result of comparison means 114, and through calculating the moon and the day that has promptly obtained lunar calendar, the lunar calendar that calculates is stored in the lunar calendar memory storage 116.
ROKUYO calculation element 117 obtains a remainder R divided by 6 with the moon data that are stored in the lunar calendar memory storage 116 again with a day data addition, and remainder R is stored in the ROKUYO memory storage 118, and the correlation table of ROKUYO and R is as follows:
R ((month data+day data)/6) ROKUYO
0 Taian
1 Shakko
2 Sensho
3 Tomobiki
4 Senpu
5 Butsumetsu
Fig. 7 is an operational flowchart, expression comparison means 114, and lunar calendar calculation element 115, lunar calendar memory storage 116, ROKUYO calculation element 117 and ROKUYO memory storage 118 obtain the operational flowchart of foregoing lunar calendar and ROKUYO.
At first, 701 steps to counter C zero clearing, in 702 steps, the count value of counter C adds 1, then, whether the value of checking register GD less than Tc, if "No" went back to for 702 steps, is "Yes" up to its result, if "Yes" deducts T with the value of register GD C-1, adding 1 again, the result of gained deposits register KD, KM in C-1Be stored in register KM, the value of register KD and KM is stored in the lunar calendar memory storage.With the value of register KM and the value addition of register RD, addition result is removed by 6, and resulting remainder deposits in the ROKUYO memory storage.
Illustrate the calculating of lunar calendar and ROKUYO below in conjunction with real data.For example, calculate the lunar calendar and the ROKUYO in November 27 1984 Christian era.
By the second accumulation day calculation element 112, the accumulation day data GD that can draw November 27 is " 332 days ", it is stored in the second accumulation day memory storage 113, comparison means is seriatim to GD data and the accumulation day data Tc(c=1,2,3 that is stored in the first accumulation day memory storage 108 ...) compare, as shown in table 1, its operating process as shown in Figure 7.
Therefore, be exactly the October 5 of lunar calendar the 27 days November in 1984 of solar calendar, because R=3, so ROKUYO is " Tomobiki ".Further, because with resulting lunar month data KM 12Information b ' the leap month of corresponding 12Be 0, therefore, expression lunar calendar October is intercalation October.
If be used to calculate the earliest first day that the date of the solar calendar of lunar calendar has precedence over this year that will calculate, so just need know last one year last lunar month and day number and the leap month information.
According to the present invention, can obtain lunar calendar and ROKUYO very simply corresponding to the solar calendar date.
When having changed the date, after determining then, just can calculate each accumulation day of first day in this year by the external data changeable device.Then, by the same operation that obtains lunar calendar, can obtain the accumulation day in different months, this accumulation day compares with each accumulation day of first day, as the latter during greater than the former, from GD, deduct that first day the accumulation day before accumulation day of first day being compared and add " 1 ", thereby can determine the date of lunar calendar, after the time is determined, also can determine the month of lunar calendar, therefore, be exactly the data in a month of lunar calendar with first day data of corresponding lunar month of accumulation day.When the time does not change, can calculate its lunar calendar very soon.

Claims (4)

1, lunar calendar arithmetic unit comprises:
Data storage device is used for storage year, month, the data message of day.
The complex data memory storage is used to store following information: to giving fixed number purpose time, first day (hereinafter referred to as first day) of annual crescent; Originate in the moon piece of data of this lunar calendar of first day; Originate in one month sky logarithmic data of last lunar calendar of first day of last one year; Data leap month of relevant certain month whether being; Originate in certain year one month of each lunar calendar of first day sky logarithmic data and the leap month data;
The first accumulation day calculation element; According to be stored in the described day access to storage device certain year the earliest first day information and the fate information of from be stored in described fate memory storage each first day initial lunar calendar each month, as " 1 ", calculate each accumulation day of first day with first day of January in this year;
The first accumulation day memory storage is used to store the accumulation day of being calculated;
The lunation calculation element according to the relevant month information and the information from every month of each first day initial lunar calendar relevant leap month that originate in first day the lunar calendar the earliest in certain year, determines each all belonged to which month of lunar calendar in first day;
Memory storage is used to store the lunar month of being calculated;
A second accumulation day calculation element as " 1 ", calculates the accumulation fate with first day of certain year in data storage device January;
The second accumulation day memory storage is used to store the accumulation day of being calculated;
Comparison means, the earliest first day from certain year, first accumulation day that is stored in the first accumulation day memory storage day is compared with second accumulation that is stored in the second accumulation day memory storage, when first accumulation day greatly the time, signal of corresponding generation;
The lunar calendar calculation element, when comparison means produces signal, that accumulation day before the first accumulation day of comparing is deducted from the second accumulation Japan and China, subtract each other the result and add " 1 ", thereby obtained a day of lunar calendar, and with relevant also corresponding the obtaining of synodic month data of accumulation day before first accumulation of making comparisons day.
The lunar calendar memory storage is used to store resulting lunation and the data of day.
2, lunar calendar arithmetic unit as claimed in claim 1, comprise the ROKUYO calculation element, according to being stored in lunar calendar data computation ROKUYO(ROKUYO in the described lunar calendar memory storage by " Taian ", " Shakko ", " Sensho ", " Tomobiki ", " Senpu ", " Butsumetsu " forms).
3, lunar calendar arithmetic unit as claimed in claim 1 further comprises the data correction device, and it can be revised the data message that is stored in the described memory storage by external operation.
4, lunar calendar arithmetic unit as claimed in claim 1 further comprises display device, and a lunation and day data that are stored in the described lunar calendar memory storage are shown.
CN 89104427 1988-05-25 1989-05-24 Lunar calendar arithmetic unit Pending CN1039907A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP127429/88 1988-05-25
JP63127429A JPH01297590A (en) 1988-05-25 1988-05-25 Old calendar computing device

Publications (1)

Publication Number Publication Date
CN1039907A true CN1039907A (en) 1990-02-21

Family

ID=14959739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 89104427 Pending CN1039907A (en) 1988-05-25 1989-05-24 Lunar calendar arithmetic unit

Country Status (4)

Country Link
JP (1) JPH01297590A (en)
CN (1) CN1039907A (en)
GB (1) GB2219108B (en)
HK (1) HK74091A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514800A (en) * 2012-06-26 2014-01-15 卡西欧计算机株式会社 Calendar display device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2980780B2 (en) * 1991-09-24 1999-11-22 ゼネラル・エレクトリック・カンパニイ Method for measuring usage time of consumed energy and usage time meter recorder
US7702651B1 (en) * 2002-12-31 2010-04-20 Teradata Us, Inc. Spatially defined universal dates
EP1708054B1 (en) 2005-03-30 2009-06-03 Asulab S.A. Analogue display timepiece capable of converting dates of a calendar into another calendar

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514800A (en) * 2012-06-26 2014-01-15 卡西欧计算机株式会社 Calendar display device
CN103514800B (en) * 2012-06-26 2016-01-20 卡西欧计算机株式会社 Calendar display apparatus

Also Published As

Publication number Publication date
JPH01297590A (en) 1989-11-30
GB8911892D0 (en) 1989-07-12
HK74091A (en) 1991-09-20
GB2219108A (en) 1989-11-29
GB2219108B (en) 1991-03-27

Similar Documents

Publication Publication Date Title
Park et al. Weighted-entropy-based quantization for deep neural networks
CN103488684B (en) Electric reliability index quick calculation method based on data cached multiple threads
US7272754B2 (en) Implementation-efficient multiple-counter value hardware performance counter
CN1125338A (en) Method and apparatus for dynamically controlling address space allocation
CN103902702A (en) Data storage system and data storage method
CN1173930A (en) Logarithm/inverse-logarithm converter utilizing second-order term and method of using same
CN109871197B (en) Data storage device and data determination device
US20050165850A1 (en) B-tree compression using normalized index keys
CN104679720A (en) Operation method for FFT
CN1039907A (en) Lunar calendar arithmetic unit
EP0605313B1 (en) Franking machine with history recording
Pope et al. Multiple precision arithmetic
CN111353763B (en) Method, device, server and storage medium for processing data
CN1203410C (en) Method and apparatus for transferring data between register stack and memory resource
CN1821993A (en) Electronic form data processing method based on time sequence
CN1115625C (en) Catendar display equipment and method and its recording medium
CN112947858B (en) RAID5 check value updating method, device and medium
Matias et al. Approximate data structures with applications
CN113342822A (en) Data query method and device based on multi-type database, electronic equipment and medium
US9177006B2 (en) Radix sort with read-only key
US4054787A (en) Apparatus for computing an arithmetically accumulated sequence of numbers
CN1278225C (en) Accumulation device and method
CN117555883B (en) Bank system data database separation method and device, memory and electronic equipment
US20240069879A1 (en) Collection and representation of program call stacks
Barron EDSAC: A Programmer Remembers

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C01 Deemed withdrawal of patent application (patent law 1993)
WD01 Invention patent application deemed withdrawn after publication